[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Michael Grant
Subject: Re: Binding the "Ctrl + ;" key combination to "focus right" command
Date: Sun, 10 Apr 2016 08:07:47 +0100

There is a possible way to use ctrl-; in screen, you would first need to bind ctrl-; to a real ascii (perhaps even a multibyte unicode character would work).  You would do this in your local window system.  It's been a while since I did this but in X it was something like setxkbmap.  In windows you could use The Microsoft Keyboard Layout Creator or kbdedit. 

You would make ctrl-; generate a character, for example, make it generate ctrl-_ which is a real ascii character.  Then you can bind ctrl-_ instead.

You may want in fact to bind those alt key sequences to ascii control characters so you don't have to remember to use the ctrl key for that function inside screen.

The down side of binding ctrl-; to something else in your window system is that this change is global, it effects every window and application on your system.  There may be some way to get it to apply just to terminal window on your system though. 

This is all really out of the scope of Screen though.

A little belated but hope this is helpful.

On 22 October 2015 at 22:16, Gheorghe Lisca <address@hidden> wrote:
Hi guys,

many many thanks for you detailed answers! You shared with me very important insights about inner workings of screen.

Kind regards,

On Fri, Aug 28, 2015 at 8:41 AM, luteijn <address@hidden> wrote:
'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).


screen-users mailing list

Gheorghe Lisca MSc.    | address@hidden
Universität Bremen     | Am Fallturm 1
28359 Bremen           | Germany
Tel: +49 421 218-64019 |
Fax: +49 421 218-64047 | - Open Knowledge for
AI-enabled robots

screen-users mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]