Tinker
2018-11-01 02:38:21 UTC
No idea how ^4 is mapped to ^\, but for some reason it is,
This goes back to the VT220, if not older terminals. Ctrl-3 forESC aka ^[ is particularly handy if the Esc key is in some inconvenient
place as on most PC keyboards.
See "Table 3-5 Keys Used to Generate 7-Bit Control Characters" in
https://vt100.net/docs/vt220-rm/table3-5.html
questions.
Is there a lot of effectively-unused legacy handling logics for
hardware that has not been manufactured for many decades, or is this
central today also?
Do unices e.g. OpenBSD/BSD, Linux, Solaris-whatever differ very much in
how they handle terminals?
Similar to how certain ctrl+ shortcut bindings are problematic, ESC is
also problematic as terminals easily confuse it right, e.g. ESC and
then rightarrow is easily confused for alt+rightarrow, right?
So this means that key bindings in your favourite console program, be
it KSH or TMUX or any other, better bind ctrl-shortcuts with great
discernment only, as they tend to have hardcoded lower-level terminal
behaviors so can't easily be preserved up to the tmux-etc. application
level and customized there, maybe you get it to work in a particular
setup but it would be fragile and maybe easily break when switching
terminal software or what not.
So binding ctrl+0-9 e.g. to switch windows is a bad idea.
More general-purpose are alt+ shortcuts e.g. alt+0-9.
Are shift+alt+-shortcuts, ctrl+shift+-, ctrl+alt+- shortcuts any
good, or any other control char I may not have thought of?
If I recall right, I did bind ctrl+0-9 successfully back in approx
OpenBSD 6.2 last year, from the latest Putty terminal then.
Did anything change in OpenBSD's terminal handling since then?
Last on this topic, are there any relevant terminal server-side
shortcut-related behaviors that can be tweaked in some environment
variable or configuration file?
Anyhow thanks for your comments, I think I kind of got the point about
what's safe and not safe shortcuts to bind.
If there are any further reading references or books on this topic feel
free to
share.
Thanks,
Tinker