I set option to meta have successfully mapped <m-left> <m-right> in iTerm by choosing to send escape sequence [1;5C and [1;5D when pressing alt-left and alt-right, but when I set alt-up and alt-down to [1;5A and [1;5B they still go behave like normal up and down keys. How could I let iTerm process alt-up and alt-down keys?

And also I coudn't use <MouseWheelUp> etc. key bindings to override iTerm's default scroll behavior (could perfectly override on macvim), it performs my mappings but also performs the default behavior which is to scroll the whole page 3 lines up/down, I now disabled iTerm's report mouse wheel events and enabled send arrow keys when in alternate screen mode, and it works and it runs what I mapped to the arrow keys, but when I press alt while scrolling it just stops (if I press alt + up/down it performs normal up/down), is there a way so I could get alt + scrolling working?


I'm wrong, I just fount that sending alt-left and alt-right as [1;5C and [1;5D doesn't trigger vim's m-left and m-right mappings, instead seems to be doing <c-left> like behaviors (which I also mapped it to). How could I make it apply?

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.