top | item 13540501

(no title)

chappar | 9 years ago

Does this mean that ^; and ^{ are also equivalent to ESC?

discuss

order

falcolas|9 years ago

^{ is, but on my terminal ^; just prints out a ;

iTerm2, in vim 1.8

guitarbill|9 years 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.

danielweber|9 years ago

You 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.

Etheryte|9 years ago

I 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|9 years ago

According 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|9 years ago

Not 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.