4

I tried the following to assign Ctrl-left/right for moving one word forward/backward, but none of them works:

(global-set-key (kbd "<C-left>") 'backward-word)
(global-set-key (kbd "<C-right>") 'forward-word)
(global-set-key (kbd "C-<left>") 'backward-word)
(global-set-key (kbd "C-<right>") 'forward-word)

Has anyone an idea?

4
  • What does ` C-h k` follow by hitting control and the right arrow report? That will show the key to use in kbd. Apr 18, 2015 at 7:01
  • BTW, keyboard macros are something else. Your question concerns key bindings. Apr 18, 2015 at 7:03
  • C-h k followed by C+<left> or C+<right> does not do anything (emacs does not take the key combination as input at all). Apr 18, 2015 at 9:51
  • Then some other app or the OS "steal" it. Sorry, I don't have a Mac so have no clue how to change that. Apr 18, 2015 at 10:32

1 Answer 1

6

Ctrl-left/right is assigned to Mission Control by default. Remove the assignment of those two shortcuts in Mac OS X system preferences / keyboard / keyboard shortcuts: Chose Mission Control on the left side and uncheck assignments on the right side.

0

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.