Define custom escape sequences in terminal
Posted
by
Ipkiss
on Super User
See other posts from Super User
or by Ipkiss
Published on 2013-10-27T09:33:36Z
Indexed on
2013/10/27
9:58 UTC
Read the original article
Hit count: 275
I would like to change the escape sequences used by some keys in my terminal. My goal is to define custom mappings in Vim (terminal version).
In the following I use shift-space as an example, but I would prefer if the proposed solution could be generic.
My current terminal (gnome-terminal) uses a simple space as escape sequence for shift-space, as can be seen by typing ctrl-v shift-space. A quick check with the true xterm shows the same behavior. I would like that the shift-space key combo generates another escape sequence (e.g., the one of shift-F30, which I would never use otherwise).
So, how would I go about doing that? And is it really a good idea? Let me know if there are better alternatives...
Note: I'm aware that this is only part of the problem: after the terminal sends a proper escape sequence for my keys, I still need to teach Vim what it means. But I think I know how to deal with that.
© Super User or respective owner