3
1
I found this online:
bindkey "\261" select 1 bindkey "\262" select 2 bindkey "\263" select 3 ....
Basically it maps alt+1 to "select 1"; alt+2 to "select 2". So when you press alt+1, it is supposed to jump to screen window 1.
This works in xterm
but not but in gnome-terminal
. I know gnome-terminal
already uses alt+N to switch to tab n. So I turned off this key mapping for gnome terminal in gnome configure editor
. But it still doesn't work.
Seems that when I press alt+1, it is received by bash
, not by the GNU screen program, so it puts a special character on the bash or puts "arg: 1"
.
Any solutions? Thanks a lot!
HI grawity, it works when binding "\033\061" to "select 1". Awesome!!! Thank you so much. Right now, it doesn't break anytings like arrows or function keys. let's see. Again, many thanks! – vim – 2011-06-10T20:26:00.597
1The reason that GNOME Terminal and most other terminal emulators these days encode Alt as an ESC prefix is that setting the Meta bit collides with character encodings beyond 7-bit ASCII. – ak2 – 2011-06-12T07:17:16.983
Hi ak2, Thanks for commenting the reason. – vim – 2011-06-13T17:15:46.703
grawity is right, the binding is breaking some things, for me I cannot type Chinese character 花 anymore. – gb. – 2012-01-06T10:06:31.320