Reputation: 53
I tried many manuals how to deal with alt key in emacs in iTerm, but no of them helped me. The problem is that all suggestions work for alt key, but not for combination of alt+shift.
What do I want:
(global-set-key (kbd "M-S-<left>") 'shrink-window-horizontally)
(global-set-key (kbd "M-S-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "M-S-<down>") 'shrink-window
(global-set-key (kbd "M-S-<up>") 'enlarge-window)
So, alt+shift+arrow must change the window size. I can easily support this for alt+arrow using this manual:
https://azaleasays.com/2013/07/05/setting-up-mac-os-x-and-iterm2-for-emacs/.
But all this doesn't work for alt+shift.
Also I tried these suggestions. It doesn't work in this particular case:
Making iTerm to translate 'meta-key' in the same way as in other OSes
I don't think it's important, but for pure picture I connect via SSH to instance and work under tmux.
Did anybody try to do this?
Upvotes: 2
Views: 467
Reputation: 53
Okay, I mostly fixed it. The main problem is that I couldn't find any description of how to correctly write "Key Mappings" for Iterm2 (googled a lot). After some attempts I could somehow resolve this as a puzzle, but it's really strange to do it like this not having any good documentation. If somebody has a link, please share it.
For people who potentially have this problem I'll write what I could find:
So, CTRL+SHIFT+"Arrow up" would be "[1;6A".
It's not full though. For example, I couldn't understand how to code letters with ALT. For example, CTRL+ALT+z. If somebody knows, please comment also.
Upvotes: 1