ansi.sys ??

#2
On Sun, 16 May 2010 11:32:26 -0400, rayandrews <> wrote:

|So, importing my aliases from 4DOS I'm bumping into all my old ansi.sys keyboard customizations. Can I remap the KB in XP/TCC ? I hope so :-(

Windows NT (all flavors) does not support ANSI control sequences in 32-bit
console applications (though you could use ANSI.SYS in COMMAND.COM).

TCC supports ANSI sequences for output (only, I believe).

What do you want to do with the keyboard?
--
- Vince
 
Apr 4, 2010
57
0
#3
On Sun, 16 May 2010 11:32:26 -0400, rayandrews <> wrote:

|So, importing my aliases from 4DOS I'm bumping into all my old ansi.sys keyboard customizations. Can I remap the KB in XP/TCC ? I hope so :-(

Windows NT (all flavors) does not support ANSI control sequences in 32-bit
console applications (though you could use ANSI.SYS in COMMAND.COM).

TCC supports ANSI sequences for output (only, I believe).

What do you want to do with the keyboard?
--
- Vince
Vince,

I assign things to the F keys and others, for example, ALT+left arrow is 'return to previous folder', ALT+up arrow is 'go up one folder' etc.
There's dozens of these things on my DOS machine.
 
#4
On Sun, 16 May 2010 13:11:40 -0400, vefatica <> wrote:

|I have a customized version of SHRALIAS which manages global hotkeys, including
|hotkeys to send strings to the foreground window. I believe it could be
|modified to only send those strings if the foreground window is TCC (or TCMD?)
|and otherwise pass the keystroke along to Windows.

But it probably wouldn't be satisfactory as a substitute for ANSI.SYS (a device
driver). For example, if you map Alt-Left to the string "CDD -" and press
Alt-Left, the string is sent immediately but nothing would happen until you
released the keys (allowing continued reading of the input. I would find that
unsaticfactory.

Since I am a man of leisure for the next 7 weeks, I'll see if I can wrap that
functionality up in a TCC plugin. A plugin could use the plugin key-handler
mechanism and achieve much more satisfactory results.
--
- Vince
 
#6
On Sun, 16 May 2010 13:34:04 -0400, vefatica <> wrote:

|Since I am a man of leisure for the next 7 weeks, I'll see if I can wrap that
|functionality up in a TCC plugin. A plugin could use the plugin key-handler
|mechanism and achieve much more satisfactory results.

On second thought, I'm not likely to do that soon (if at all).

TCC already has a pretty robust keystroke alias mechanism (help alias).

It won't do Alt-Left (I don't know why not), but you can, for example,

option //normalkey=ctrl-left
alias @@ctrl-left `CDD -`

Note that Ctrl-Left is normally mapped to move-to-previous-word.
--
- Vince
 
Apr 4, 2010
57
0
#7
On Sun, 16 May 2010 13:11:40 -0400, vefatica <> wrote:

|I have a customized version of SHRALIAS which manages global hotkeys, including
|hotkeys to send strings to the foreground window. I believe it could be
|modified to only send those strings if the foreground window is TCC (or TCMD?)
|and otherwise pass the keystroke along to Windows.

But it probably wouldn't be satisfactory as a substitute for ANSI.SYS (a device
driver). For example, if you map Alt-Left to the string "CDD -" and press
Alt-Left, the string is sent immediately but nothing would happen until you
released the keys (allowing continued reading of the input. I would find that
unsaticfactory.

Since I am a man of leisure for the next 7 weeks, I'll see if I can wrap that
functionality up in a TCC plugin. A plugin could use the plugin key-handler
mechanism and achieve much more satisfactory results.
--
- Vince
Vince,

Thanks in advance. There is almost certainly a way to do what I want, but it looks like I'm barking up the wrong tree with ansi.sys. Weening myself off 16 bit DOS is going to be painful since I automaticaly think in terms of those old ways of working.
 
Apr 4, 2010
57
0
#9
The loss of the ability to remap keys through ANSI.SYS helped me find my
way to AutoHotkey, which you also might find useful. You can find this
nice piece of freeware at http://www.autohotkey.com. Just a thought.

-- Dan McMullin
Thanks again Dan, autohotkey seems like it will do the trick, eg:

!Up::
Send cd ..
Send {Enter}
return

... and my Alt+UpArrow does what I want at the TCC CL.

Now what I need is some equivalent of pushdir and popdir.
 
#10
I'm really glad AutoHotkey did what you wanted.

FYI, you can write scripts so that the keystroke reassignments work only
in certain windows rather than all windows in case that becomes
necessary. I also like to assign an otherwise meaningless key
combination (Alt-' in my case) as a suspend / resume toggle for all the
other reassignments. I sometimes temporarily need reassigned keystrokes
to perform "naturally" so it's handy to have a way to turn them all off
at once.

-- Dan McMullin
 
Apr 4, 2010
57
0
#13
I'm really glad AutoHotkey did what you wanted.

FYI, you can write scripts so that the keystroke reassignments work only
in certain windows rather than all windows in case that becomes
necessary. I also like to assign an otherwise meaningless key
combination (Alt-' in my case) as a suspend / resume toggle for all the
other reassignments. I sometimes temporarily need reassigned keystrokes
to perform "naturally" so it's handy to have a way to turn them all off
at once.

-- Dan McMullin
Dan,

I'd figure it out for myself, but since you already know, what's the syntax for this 'Alt-'? All my existing ansi.sys assignments are, obviously, just DOS CL stuff, so I'll only be needing the autohotkey equivalents under TCC, so, I'd like to load them just when starting TCC and kill them when back in XP GUI. If I can automaticaly run an autohotkey script to make these CL key assignments along with TCC and then kill them when back in the GUI, that would be perfect.
 
#14
On Tue, 18 May 2010 21:49:23 -0400, rayandrews <>
was claimed to have wrote:


>---Quote (Originally by Charles Dye)---
>What's wrong with PUSHD and POPD?
>---End Quote---
>
>Yeah, that's them ... will they work with XP? ... thought they'd only
>work in 16 bit DOS. Come to think of it, I have no basic idea which
>of my old utilities will work in 32 bit.
They're built-in to TCC...
 
#16
Ray, I freely admit to being no expert at the ins and outs of AHK
scripting. My needs with regards to that program are pretty basic.
Fortunately, it seems as though yours are, too. So I'd be glad to share
a few tips but I think the TC/TCC forum probably isn't the best place
for that. Feel free to send an email to my forum nickname at gmail.com
and we can go as far off-topic as you'd like.

-- Dan