Created
June 19, 2016 15:24
-
-
Save halcyon/d2532d74536746999e454136862faa63 to your computer and use it in GitHub Desktop.
xterm escape codes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| A VT100 terminal couldn't do that, because there is no ^( control character corresponding to (. However, xterm has the so-called "modifyOtherKeys" mode, which does allow to send unique keycodes for combinations like that. | |
| To enable it, set the modifyOtherKeys resource, e.g. in ~/.Xdefaults: | |
| XTerm*vt100.modifyOtherKeys: 1 | |
| With that, Ctrl+( will send the following keycode: | |
| ^[[27;6;40~ | |
| That's rather long though, so another format for keycodes like that was introduced, which can be enabled by setting the formatOtherKeys resource: | |
| XTerm*vt100.formatOtherKeys: 1 | |
| With that, Ctrl+( sends: | |
| ^[[40;6u | |
| In both of these keycodes, the 40 is the decimal ASCII code for (, and the 6 represents the Ctrl. | |
| See man xterm and http://invisible-island.net/xterm/ctlseqs/ctlseqs.html for further details. No idea whether Terminal.app supports any of it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment