3 ms·
Does this mean that ^; and ^{ are also equivalent to ESC?
by chappar 10y ago
Does this mean that ^; and ^{ are also equivalent to ESC?
- falcolas 10y ago^{ is, but on my terminal ^; just prints out a ; iTerm2, in vim 1.8
- guitarbill 10y ago^[ and ^{ do the same thing in Terminal.app (macOS Sierra) and vim 8.0. However, I get the bell sound (which generally denotes invalid input in macOS) for ^; and it prints nothing.
- Etheryte 10y agoI guess it could in theory, on my keyboard, however, CTRL seems to override other control chars, so typing ^{ doesn't seem possible at all, at least without any hacks. (I don't have a US layout keyboard.)
- mikedude 10y agoAccording to the bit-wise AND at the end of the article it should, but it seems like there's more to it than just zeroing out the 'column' bits.
- corndoge 10y agoNot sure if this is specifically related, but- CTRL does not actually modify the character code sent from the keyboard. For letters, the same keycode (which maps to ASCII with a constant addition of 0x3D) is always sent. Another byte in the HID report contains bit flags for modifier keys (L/R CTRL, SHIFT, etc); the OS decides what happens after that. Note that this holds under USB HID.
- jandrese 10y agoNot on a modern PC, but on the machine ASCII was originally developed for I could definitely see the CTRL key just pulling one bit low on the keyboard encoder.
- danielweber 10y agoYou have control characters for the characters from 64 to 95. Control-@ is 0. Control-A is 1, through control-Z is 26. Control-[ is 27, escape. Control-\ is 28. Control-] is 29. Control-^ is 30. Control-_ is 31.