serenity
serenity copied to clipboard
LibVT: Implement keypad application mode
This is my attempt to implement keypad application mode for LibVT.
I followed the documentation from vt100 documentation. However, what confuses me is the presence of VT52 mode and ANSI mode, each emitting different sequences. Additionally, there are vt220 documentation and xterm keypad application mode, both emitting different sequences as well.
Any recommendations or corrections would be very appreciated.
Thanks
VT52 mode is a special emulation mode enabled by resetting DECANM which provides an incompatible set of escape sequences which were present on VT52. It's not used by modern applications and is not supported by LibVT. You can think that we are permanently in ANSI mode, so the other table should be used here.
VT52 mode is a special emulation mode enabled by resetting DECANM which provides an incompatible set of escape sequences which were present on VT52. It's not used by modern applications and is not supported by LibVT. You can think that we are permanently in ANSI mode, so the other table should be used here.
Thanks a lot for your explanation.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
Re different escapes, it's pretty much random which one is used in a given emulator, I'm not aware of any consensus on a defacto mode, so whichever you choose to use is pretty much okay imo.
In an ideal world we'd make it configurable, but I don't think it's worth the added trouble.
Thank you for reviewing, the suggested change looks a lot cleaner. I will update and push a commit now