serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibVT: Implement keypad application mode

Open hanaa12G opened this issue 1 year ago • 2 comments

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

hanaa12G avatar Dec 04 '23 22:12 hanaa12G

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.

summaryInfo avatar Dec 05 '23 05:12 summaryInfo

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.

hanaa12G avatar Dec 05 '23 12:12 hanaa12G

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!

stale[bot] avatar Jan 05 '24 16:01 stale[bot]

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.

alimpfard avatar Jan 13 '24 08:01 alimpfard

Thank you for reviewing, the suggested change looks a lot cleaner. I will update and push a commit now

hanaa12G avatar Jan 15 '24 20:01 hanaa12G