[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Triple modifier combinations and extra keys
From: |
Thomas Dickey |
Subject: |
Re: Triple modifier combinations and extra keys |
Date: |
Wed, 28 Oct 2020 19:24:31 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Wed, Oct 28, 2020 at 08:11:30AM +0100, michal@kast.net.pl wrote:
> Greetings!
>
> Lately I have read some sections of NCurses FAQ and XTerm FAQ in search
> of knowledge about key modifiers. Learned that XTerm can and does emit
> sequences for ctrl + alt + shift + (key), like for what could be kDC8.
> Telling NCurses about those with define_key() works as expected. If this
> is documented why neither NCurses nor XTerm carry the definitions in
> terminfo?
There's more than one reason. Offhand:
a) until ncurses 6.1, ncurses would limit (for compatibility) terminfo
entries to 4096 bytes.
b) for compatibility, the preferred scheme for representing the modified
function-keys has been by assigning them to the predefined numbered
kf1 through kf63 (should have been kf0, but again, compatibility...).
That's usually
kf1-kf12 (no modifiers)
kf13-kf24 (shift)
kf25-kf36 (control)
kf37-kf48 (shift+control)
kf49-kf60 (alt)
kf61-kf63 (shift+alt)
So that runs out before getting to three modifiers.
c) I could just generate (whatever would fit in 64kb), but that has a few
drawbacks:
a) it would be slower to load
b) very few people would use (and benefit by) it
c) half of the xterm-alikes don't really work for that anyway
Given the drawbacks, I'd make a terminal description with a different
name, for the people who might use it.
> The other discovery is about so called multimedia keys. I have several
> of those in my keyboard. Some like calculator or www key are straight
> eaten by terminal emulators and nothing is offered in return.
>
> My problem is with those that do send sequences. For example menu key
> is consistently emitted as F16 but ways to get F16 are not so. In XTerm
> F16 is obtainable by shift + F4 while in URxvt this is shift + F6. In
> practice giving user option to use menu key for a function means I need
> to have both shift + F4 and shift + F6 unbound to avoid collisions.
> I would like to learn about other such possible conflicts. Is there a
> list of supported multimedia keys available anywhere? I could not find
> anything relevant in NCurses or XTerm FAQ.
no - it's dependent upon the keyboard configuration,
and the people who develop that stuff don't produce useful documentation.
A few configurations are enough alike to make the terminal descriptions useful.
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature