14

I have an iMac running OSX 10.8.4.

I've tried this on emacs built from Homebrew, as well as a version I've downloaded from http://emacsformacosx.com/

I've tried this with a completely clean ~/.emacs.d.

What happens when I go C-h k then type ctrl-up arrow, is I get a explanation that " runs the command backward-paragraph" and so on. The same thing with ctrl-down arrow.

When I try ctrl-right arrow, or ctr-left arrow, nothing happens.

If I go C-h b I see that they keys are bound:

<C-left> left-word <C-right> right-word

But nothing happens.

I'm running the standard, flat, mac keyboard with a cord.

14

Actually, I found that ctrl-left arrow and ctrl-right arrow did nothing, even for other applications on my Mac.

Under Keyboard -> Keyboard Shortcuts in System Settings, you'll have to deselect the Mission Control shortcuts, which appear to have been added through some OSX update.

enter image description here

| improve this answer | |
2

⌃← and ⌃→ worked for me by default in Emacs.app and when I ran emacs from iTerm 2, but not when I ran emacs from Terminal.

If you use emacs in Terminal, try changing ⌃← from \033[5D to \033[1;5D and ⌃→ from \033[5C to \033[1;5C. You can insert \033 by pressing the escape key. \033[1;5D and \033[1;5C are the default values of the keys in iTerm 2.

If ⌃← and ⌃→ don't work in Emacs.app either, the problem might be that they are used for changing desktops, but you only have one desktop open, so they don't seem to do anything. Check System Preferences > Keyboard > Keyboard Shortcuts > Mission Control.

| improve this answer | |
1

If you also need C-up and C-down in Terminal.app for Emacs, try adding the following keys under Terminal > Preferences > Profile > some profile > Keyboard:

^↑  \033[1;5A
^↓  \033[1;5B
| improve this answer | |
  • Works beautifully! I'd like to know why these input combinations don't "just work" without having to specify arcane keymappings by hand… – Radon Rosborough Jun 21 '16 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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