2 ms·
Correct architecture for terminal applications is command line; line oriented input, line oriented output. Not handling individual key events.
by zokier 5y ago
Correct architecture for terminal applications is command line; line oriented input, line oriented output. Not handling individual key events.
- karatinversion 5y agoNot always, mind; having to press enter after every character press in vim would be a major drag!
- zokier 5y agoed/ex works perfectly fine with only line input and output. Afaik TECO stared out like that too. Gvim works for visual editing
- PaulDavisThe1st 5y agoEven back in the 1980s, when I was asked to reimplement the heirarchical DEC VMS "help" command for SunOS (in a terminal window), it was necessary to handle individual characters rather than use line-oriented input. The VMS "help" command had been written for VT100/VT200 terminals and their cousins, and was designed to take action on a single key press, rather than waiting for a return/enter action to "send" the command.
- icedchai 5y agoYou can read individual characters just fine from a command line app. That's what tty "raw" mode does.