1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ansi.sys ??

Discussion in 'Support' started by rayandrews, May 16, 2010.

  1. rayandrews

    Joined:
    Apr 4, 2010
    Messages:
    57
    Likes Received:
    0
    Next question:

    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 :-(
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,783
    Likes Received:
    29
    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
     
  3. rayandrews

    Joined:
    Apr 4, 2010
    Messages:
    57
    Likes Received:
    0
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,783
    Likes Received:
    29
    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
     
  5. WavSlave

    Joined:
    May 29, 2008
    Messages:
    47
    Likes Received:
    0
    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
     
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,783
    Likes Received:
    29
    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
     
  7. rayandrews

    Joined:
    Apr 4, 2010
    Messages:
    57
    Likes Received:
    0
    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.
     
  8. rayandrews

    Joined:
    Apr 4, 2010
    Messages:
    57
    Likes Received:
    0
    I've heard of that program ... gotta check it out, Tx, Dan
     
  9. rayandrews

    Joined:
    Apr 4, 2010
    Messages:
    57
    Likes Received:
    0
    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. WavSlave

    Joined:
    May 29, 2008
    Messages:
    47
    Likes Received:
    0
    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
     
  11. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    What's wrong with PUSHD and POPD?
     
  12. rayandrews

    Joined:
    Apr 4, 2010
    Messages:
    57
    Likes Received:
    0
    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.
     
  13. rayandrews

    Joined:
    Apr 4, 2010
    Messages:
    57
    Likes Received:
    0
    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. thedave

    Joined:
    Nov 13, 2008
    Messages:
    254
    Likes Received:
    2
    On Tue, 18 May 2010 21:49:23 -0400, rayandrews <>
    was claimed to have wrote:


    They're built-in to TCC...
     
  15. rayandrews

    Joined:
    Apr 4, 2010
    Messages:
    57
    Likes Received:
    0
    Kewl, I only remember them as external .coms. Probably half of what I used to do with externals is now built in :-)
     
  16. WavSlave

    Joined:
    May 29, 2008
    Messages:
    47
    Likes Received:
    0
    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
     

Share This Page