0

Emacs uses a lot of C-. and similar keyboard sequences.

iTerm doesn't send the key sequence C-. itself, but I've found that I can map C-. into an escape sequence or hex code or text in iTerm's preferences/profile/keys. How can I get iTerm to send C-. as something that Emacs will recognize?

1

You can view Emacs' key bindings by typing C-h, b. If you then search the help text for C-. you'll find this mapping:

M-[ 2 7 ; 5 ; 4 6 ~ C-.

The ESC [ … ~ sequence is used to send arbitrary key combinations numerically, primarily for combinations that don't map to a specific character. Since Control-Period doesn't map to a character that can be sent to a terminal, map it to the character sequence ESC [ 2 7 ; 5 ; 4 6 ~ (without the spaces).

The second parameter in the escape sequence is a number representing the modifier keys and the third parameter is the base character. The modifier-key values are described at the end of the PC-Style Function Keys section of the XTerm Control Sequences documentation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .