3 ms·
How terminal works? Badly. The terminal protocol is broken in fairly fundamental ways (see: How do I get an event for <shift> key up/down by itself? How do I
by bsder 2y ago
How terminal works? Badly.
The terminal protocol is broken in fairly fundamental ways (see: How do I get an event for <shift> key up/down by itself? How do I distinguish Esc by itself from Esc combined with something else)
A lot of modern things have adopted the Kitty extensions in order to solve this:
See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/ https://sw.kovidgoyal.net/kitty/keyboard-protocol/
- Xerox9213 2y agoKitty is great. I started using it because I like cats. But I am learning more and more about how robust it is.
- lmz 2y agoAnd yet because of the *nix OSs being widely available it has even displaced superior models e.g. the Windows character cell model [0] is arguably a better fit for modern terminals yet new development goes to compatibility with "cross platform" inband signaling and escape sequences. [0]: https://learn.microsoft.com/en-us/windows/console/console-functions https://learn.microsoft.com/en-us/windows/console/console-fu...
- otabdeveloper4 2y agoIt isn't broken. As far as standards go it is a fairly clean and easy to implement one. (That is the reason for its enduring popularity.) Source: wrote a terminal emulator once. Turned out to be not that difficult. We just need to agree on an xterm-compatible subset of functionality and throw away the rest, which nobody ever uses anyways. Your complaints are just aesthetic complaints, the terminal isn't supposed to be a universal GUI toolkit.
- zokier 2y ago> How do I get an event for <shift> key up/down by itself? How do I distinguish Esc by itself from Esc combined with something els How do I drive a screw with a hammer? Badly. It doesn't make hammer a bad tool though. Terminals are a simple tool. The inputs and outputs are lines of text. If your application doesn't fit that model and needs keypress events then terminal is simply the wrong tool for the job.
- M95D 2y agoLet's take MC, or any other TUI app. Esc is the common key to use to exit from menus, dialog boxes, various views, etc. If the terminal is the wrong tool, then give example of the right tool.
- eviks 2y agoGUI is
- zokier 2y agoAs I said, terminals are best suited for command line applications; lines of text in, lines of text out. Something that would work on classic ASR-33 or ADM-3A. Dialog boxes, menus, and views are concepts that are more fitted to GUIs. And as such the right tool these days would be Wayland. For example, you get native keyboard scancode events and XKB keymaps, allowing far better input handling capabilities than any layering of hacks on top ANSI escape codes ever can. The whole point of terminals is that they are simple, text based, and as such interoperable and standardized. ANSI escape code extensions are decidedly not text nor simple, and often very non-interoperable to varying degrees. As such they are pretty antithetical to the whole idea of terminals.
- M95D 2y agoI am against this view. GUI invites bloat.
- matvore 2y agoYes, let's take dozens of terminal emulator projects out of maintenance mode so app devs can individually and capriciously overload my shift and escape keys, because modern.
- johnnyjeans 2y agowhat if... we could scrolljack.... the terminal rips bong