Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

In Terminal.app on Snow Leopard, the key combinations Ctrl+ and Ctrl+ don't get passed through correctly. Instead Terminal.app receives a single or key stroke.

I have verified this by running cat -v, which prints the code ^[[A for both Ctrl+ and , and the code ^[[B for both Ctrl+ and .

I have looked through the keyboard shortcut settings in System Preferences, but nothing is mapped to them. Furthermore, the keystrokes work in MacVim (I first noticed this issue when these keystrokes didn't work for me in vim in the terminal).

I'm also running iTerm2, which doesn't receive Ctrl+ or Ctrl+ at all (as tested with cat -v).

Where can I figure out what's eating my Ctrl+ and Ctrl+ keystrokes in Terminal.app and iTerm2?

share|improve this question
    
There is no ASCII code for Ctrl-Up/Ctrl-Down, any software who wants to interpret Ctrl-Up different from Up must check the status of any modifier key itself. cat obviously doesn't. –  patrix Nov 4 '12 at 9:50
add comment

1 Answer

up vote 2 down vote accepted

In the Terminal preferences, go to Settings and select Keyboard in the panel. There you can set various key combinations to send whatever string you wish to the shell (or the program currently running).

share|improve this answer
    
I see, this needs to be set manually? Is there a reason why this key combination (or any not listed in the preferences) are not sent through to the Terminal? –  Mike Mazur Nov 4 '12 at 14:23
    
What makes you think this key combination is not sent through to the Terminal? If you can set it in the Terminal preferences, and it then works, then it is sent through. It's just that Terminal in its default configuration chooses to ignore it. Yes, it needs to be set manually, most likely because there is no well defined standard as to what should be sent in response to these keypresses. –  Harald Hanche-Olsen Nov 4 '12 at 14:33
    
Right, I should have instead asked why Terminal chooses to ignore the key combination if it's not defined in the preferences. Lack of a well defined standard seems plausible. Thank you! –  Mike Mazur Nov 5 '12 at 22:26
add comment

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.