Re:Ask HN: What do you love/hate about terminals? Would you ...
by btschaegg on Wednesday December 27, 2017 @05:19PM
(#16018544)
As far as I can see it, we basically agree on everything discussed so far, except for the idea that it might be worth to try and fix some historical shortcomings.
While that's a worthwhile discussion to have and I see the difficulties in maintaining compatibility (see my original post), I'd say that arguing either way goes somewhat against the premise of this thread.
If we implemented what you proposed, terminal emulators wouldn't be terminal emulators anymore -- they'd be some sort of generic input and output framework. While we're at it, why don't we include another API to take advantage of the high-color framebuffer displays most modern computers enjoy rather than just displaying a grid of fixed-width text characters. Oh look, we've just reinvented X11. Again (see: Wayland).
Or how about no, because it's yet another library dependency in what should be a straightforward terminal program, and the whole solution breaks when the program is talking to a real live terminal (as Linux programs can still actually do) because there is no "underlying key event" from a terminal. And if you are assuming an environment like X11 or Wayland, just write an X11 or Wayland program and be done with it. (Both vim and Emacs have taken this approach, and AFAIK support keybindings of the type you describe while running in graphical mode.)