123elf
123elf copied to clipboard
Key bindings for DEC VT-320 terminal
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?
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);
}
I did it in this new commit. I used printf() because fwrite() - also with fflush() - did not write anything on the terminal.
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!
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
"vtxxx" is a binary file labeled as "PDP-11 UNIX/RT ldp", never heard about that...
Hard to find infos about that format