ANSI escapes for input (Developers)
> Hey, it's OK to make old software and machines do unreasonable things. I'm
> not arguing with you about the merits of that; it's your project and not my
> business. I'm just pointing out that it's not in ANSI.SYS or any other
> device driver I know of for DOS because that's not how DOS software at the
> time used the keyboard.
Ok, thanks. That sounds like a chicken and egg
problem though.
> Usually if you want to write something that runs on multiple platforms you
> include some sort of compatibility layer that hides the machine specifics,
> like the curses library on Unix.
I see.
> Trying to bend the various OSes to your
> will is a very different approach. For DOS specifically you'll need a
> device driver that intercepts the BIOS routine and generates the ESC
> sequences that you are looking for.
I was thinking a TSR that hooks the DOS read, for
read from handle 0.
> Which will be fine while you are in
> your program, but that device driver will interfere with other DOS
> programs.
I didn't even think of that. The thing is - I'm not
running other DOS programs. Only Win32 programs,
using HX.
And even then - I'm only running Win32 programs that
I provide myself. Well - ones that read from the
keyboard and do something with cursor keys, anyway.
And really only one of them even - microemacs 3.6.
> Which is probably why a device driver that remaps the cursor
> keys like that doesn't exist.
Ok, makes sense. Thanks. I have an abnormal use case.
So I'll need to organize that myself.
Actually, the BIOS might be a better place to intercept.
Because if I redirect stdin to a file, for some unusual
situation like automatic commands for microemacs, it would
have the ANSI escapes in there already. And I wouldn't be
able to translate a single ESC pressed by the user into
two ESC for the stream.
And if that command STTY or whatever it is that redirects
stdin to a serial port, was run, and I attached a VT100
or whatever to the serial port, it shouldn't be interfered
with either.
BFN. Paul.
Complete thread:
- ANSI escapes for input - kerravon, 18.07.2023, 02:08 (Developers)
- ANSI escapes for input - mbbrutman, 24.07.2023, 03:01
- ANSI escapes for input - kerravon, 24.07.2023, 15:18
- ANSI escapes for input - DosWorld, 08.02.2024, 23:03
- ANSI escapes for input - kerravon, 09.02.2024, 13:17
- ANSI escapes for input - DosWorld, 08.02.2024, 23:03
- ANSI escapes for input - ecm, 24.07.2023, 17:01
- ANSI escapes for input - mbbrutman, 25.07.2023, 03:35
- ANSI escapes for input - kerravon, 25.07.2023, 12:34
- ANSI escapes for input - KormaX, 25.07.2023, 12:57
- ANSI escapes for input - kerravon, 27.07.2023, 07:15
- ANSI escapes for input - kerravon, 30.07.2023, 09:08
- ANSI escapes for input - kerravon, 31.07.2023, 15:21
- ANSI escapes for input - kerravon, 07.02.2024, 08:23
- ANSI escapes for input - bocke, 07.02.2024, 08:45
- ANSI escapes for input - kerravon, 09.02.2024, 10:00
- ANSI escapes for input - bocke, 09.02.2024, 20:10
- ANSI escapes for input - kerravon, 09.02.2024, 22:07
- ANSI escapes for input - bocke, 09.02.2024, 20:10
- ANSI escapes for input - kerravon, 09.02.2024, 10:00
- ANSI escapes for input - bocke, 07.02.2024, 08:45
- ANSI escapes for input - kerravon, 30.07.2023, 09:08
- ANSI escapes for input - kerravon, 27.07.2023, 07:15
- ANSI escapes for input - mbbrutman, 27.07.2023, 04:51
- ANSI escapes for input - kerravon, 27.07.2023, 07:25
- ANSI escapes for input - KormaX, 25.07.2023, 12:57
- ANSI escapes for input - kerravon, 25.07.2023, 12:34
- ANSI escapes for input - mbbrutman, 25.07.2023, 03:35
- ANSI escapes for input - kerravon, 24.07.2023, 15:18
- ANSI escapes for input - mbbrutman, 24.07.2023, 03:01