문제

I have the following keyboard shortcut in my init.el

(global-set-key (kbd "C-S-<up>") 'move-line-up)

This works great in Cocoa Emacs.app, but when running emacs in console mode in iTerm2 it seems that they keys never make it to emacs.

I tried running the following in emacs

(read-key-sequence "?")

And entering C-S-<up> in the prompt but it was never received. That makes me think that either iTerm2 or zsh is stealing the keystrokes. Any ideas on how to debug this? Or better yet answers?

도움이 되었습니까?

해결책

My guess would be that it's iTerm intercepting things.

You might find this site helpful. It says:

Select Profiles > Open Profiles… from the menu bar, or press Command-O and take a look at the default profile. Click on the Keys section. While you are here verify you have Left Option and Right Option as +Esc.

For the arrow key fixes though you will need to add a series of key shortcuts. The easiest way to get started is select Load Preset… > xterm Defaults

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top