123elf icon indicating copy to clipboard operation
123elf copied to clipboard

Key bindings for DEC VT-320 terminal

Open sblendorio opened this issue 2 years ago • 6 comments

sblendorio avatar May 26 '22 14:05 sblendorio

Thanks, this is fun! I wonder if I can just automate it though, if TERM=vt320, can I just send those strings in main() and it will work?

taviso avatar May 27 '22 13:05 taviso

Untested, but I'm thinking of something like this in main()?

if (strcmp(getenv("TERM"), "vt320") == 0) {
      setenv("TERM, "vt100", 1);
      fwrite(""\eP1;1;1|33/1b5b363b357e\e\\", xx, 1, stdout);
}

taviso avatar May 27 '22 13:05 taviso

I did it in this new commit. I used printf() because fwrite() - also with fflush() - did not write anything on the terminal.

sblendorio avatar May 27 '22 16:05 sblendorio

The patch looks good to me! I copied your note to the wiki too:

https://github.com/taviso/123elf/wiki/Terminals

I've noticed there is a built-in keymap called "vtxxx", but I don't know what it does, I just want to check that isn't better than vt100 for some terminals before overwriting it!

taviso avatar May 28 '22 13:05 taviso

Do you think it's possibile to control PF3 and PF4 keys through your patch? Both original VT100 and VT320 got PF3 and PF4, while F20 and F19 are absent on VT100

sblendorio avatar May 30 '22 10:05 sblendorio

"vtxxx" is a binary file labeled as "PDP-11 UNIX/RT ldp", never heard about that...

image

Hard to find infos about that format

sblendorio avatar May 30 '22 12:05 sblendorio