screen-users
[Top][All Lists]
Advanced

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

Re: Using modifier keys other than control in custom keybindings


From: Stephane Chazelas
Subject: Re: Using modifier keys other than control in custom keybindings
Date: Wed, 18 Jun 2008 16:50:54 +0100
User-agent: Mutt/1.5.16 (2007-09-19)

On Wed, Jun 18, 2008 at 10:16:01AM -0500, Samir Unni wrote:
[...]
> Thanks a lot for the help! I didn't think about using the Vim keybindings
> for this purpose, and that's a lot better for me than using Tab/Shift-Tab
> anyway. What you said about the characters being sent by the terminal is
> very interesting though. Are the characters sent by certain keys
> configurable in a terminal? If not, what determines the mappings between
> keys and characters sent by a terminal? That is, will all xterms have the
> same set of mappings, or is there a config file? I don't see one in ~....
[...]

Generally it's hardcoded and it's probably better that way.
Applications struggle already to know what sequence the terminal
"xxx" sends on <Home>, so if everybody can change everything,
that becomes impossible.

Having said that, xterm, at least allows you to change the
bindings via the Xt "translations" resource.

Example:

XTerm.VT100.translations:             #override\
        Shift <KeyPress> Tab: string(0x1b) string("[Z")

to send \e[Z upon <Shift-Tab>

You can either define those resources in files loaded by xterm
(~/.Xdefaults, or xterm specific app-default file) or install
them in the X server with xrdb. So that every xterm that
connects to your xserver will have those resources set.

The the X or X11 man pages and X toolkit docs for more details.

-- 
St├ęphane




reply via email to

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