You are not logged in.
Beeing able to bind the super key in screen would be a very welcome thing. But I cant seem to find out how. I'm sick of it taking over and conflicting with other programs. ![]()
Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin
Offline
Programs like screen only see terminal character sequences, unfortunately things
like super can't be used because there's no corresponding ASCII code. So you need
a 2 phase setup:
1. Map your key into some code sequences in your terminal emulator.
2. In your screenrc, bind this code sequence to some function you want.
I don't know how to do part 1 in a real console, the arch wiki seems to have
the information http://wiki.archlinux.org/index.php/Ext … in_Console.
But I never read that. Here's my approach using urxvt + screen:
in .Xdefaults:
URxvt.keysym.Mod4-semicolon: \036p
URxvt.keysym.Mod4-apostrophe: \036nThis makes the key combination mod4 and semicolon generates the control sequence
\036 p, and similar for mod4 + apostrophe, and then in my .screenrc I do:
escape ^~~By doing this I set the command character to control + ~, if you look at this table
http://vt100.net/docs/vt100-ug/table3-5.html, you will see that
pressing control and ~ together generates the octal code \036. So after all of these,
when I press mod4 + semicolon, screen gets <command character> + <p>, which means
"switching to previous window", and in the same way mod4 + apostrophe causes screen to
switch to next window.
Of course other terminal emulators have different key binding strategies and you have
to change what I have written for urxvt here.
http://www.vt100.net is very useful if you want to know more about terminals
or terminal emulators.
Offline
Thanks for very useful reply.
I have a couple of questions though ![]()
What does mod4 mean?
I the vc/tty pressing the ~ key generates the ~ without any modifier, in X you have to use Alt Gr to display it, is that not an issue in your setup, or does you .Xdefaults take care of that?
Cheers.
Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin
Offline