Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I send Ctrl+; in iterm2 (emacs)?

There seems to be a solution here, here and here

These are close to what I want, but I am still unable to make it work.

share|improve this question
    
Adapting my answer to the third link and sending 0x1B 0x3B doesn't work? –  Daniel Beck Mar 20 at 18:54
    
Thanks for the response. I tried it, and realized 0x1B = ESC not control? (emacs sees it as M-; not C-;) –  eugene Mar 21 at 1:14

1 Answer 1

up vote 0 down vote accepted

The way I make these key combinations work is to go to the Keys section of the iTerm prefs and create a shortcut for ^; that sends some escape sequence, like ^[[aa (you can replace aa with anything, but be aware that some things are mapped to actual keys). Then in your .emacs, create a keyboard shortcut for what you want it to map to, like

(global-set-key (kbd "C-[ [ a a") 'the-function-you-want-to-map-to)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.