Re: Binding the "Ctrl + ;" key combination to "focus right" command

luteijn <luteijn-qWit8jRvyhVmR6Xm/[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <[email protected]>
Hi,
'ctrl-;' doesn't really exist (for certain definitions of existing), so 
that's why it's likely not possible to bind it to something in screen. 
It might be that your terminal sends the equivalent of ctrl-[ when you 
press ctrl and ;, or it might just not send anything. As ctrl-[ is the 
same as pressing the escape key, you might not want to actually bind 
anything to it.

Window managers typically don't get information in the same way from the 
keyboard as screen does (screen just gets a stream of characters typed, 
the WM can get information like key-X-pressed, key-Y-pressed, 
key-Y-released etc.), so ctrl-; could work fine there.

I guess you could use hjkl instead of jkl; for directions (although 
ctrl-h sends the same as backspace; in general lots of control 
characters (including ctrl-a) are not too suitable as hotkeys as they 
are already used for something, by the programs you'll be running).

Unfortunately, there really aren't that many unused keys on our 
keyboards that you can use for these kind of macro's. At work I have to 
use windows anyway, so there I've set up Autohotkey to change what is 
being send by the numeric keypad to short escape-sequences that screen 
can then interpret and use to do the sort of things you are trying to 
bind to ctrl-jkl;. For some time I even had an entire second keyboard 
just for these hotkeys, and used a little program meant for flight 
simulators enthusiasts to remap anything sent from that keyboard to 
special escape sequences.

Some good 'free' keys/combinations that I've found to work on basic 
keyboards are the F-keys, ctrl-\, and prefixing things with an <ESC> 
(usually sent by pressing alt-<key>, but can also be faked by pressing 
the escape key and the other key in quick succession).


Regards,
Pieter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.