1

I'm following info found on this link, but cannot get the desired custom key bindings to work for windmove.

Basically, I put the following in my .emacs file:

(global-set-key (kbd "C-M-<left>") 'windmove-left)
(global-set-key (kbd "C-M-<right>") 'windmove-right)
(global-set-key (kbd "C-M-<up>") 'windmove-up)
(global-set-key (kbd "C-M-<down>") 'windmove-down)

Where my Control key is Ctrl and my Meta key is Alt, and I am using Emacs 24.5.1 on OS X 10.10.5.

While I have two windows in a maximized terminal (iTerm2), nothing happens when I press any of the 3-key chords above. Why?

Drew
  • 75,699
  • 9
  • 109
  • 225
MLister
  • 205
  • 2
  • 8
  • Maybe these shortcuts are intercepted by the os. `switch workspaces` on linux. – djangoliv Dec 02 '15 at 08:01
  • 3
    Use C-h k and press one of the key chords to confirm what emacs is receiving. I bet that the shift is not seen by the terminal protocol. Getting shift to work as a modifier for anything but capital letters over terminals is, kindly, problematic. Not emacs's fault; do a search on this site for terminal modifier keys. You may need to define a 2-step chord for use on terminals. – InHarmsWay Dec 02 '15 at 13:30
  • 1
    Related: [Problems with keybindings when using terminal](http://emacs.stackexchange.com/questions/1020/problems-with-keybindings-when-using-terminal). – Dan Dec 02 '15 at 16:26
  • this might interest you: http://sachachua.com/blog/2015/01/emacs-microhabit-switching-windows-windmove-ace-window-ace-jump/?shareadraft=baba27863_54bd285449177 – adl Feb 11 '19 at 23:59

0 Answers0