Hello,
On Mon, 12 Feb 2018, Gertjan Halkes wrote:
> First one remark: the recently released libt3widget 0.6.0 contains some
> code changes which make configurable keybindings possible. Currently, tilde
> doesn't actually use the functionality, so what is really missing is menus
> etc. in Tilde to actually make use of this.
Ah, all right. Then there is no point in me polishing my patch and
sending it to you :-)
> To answer your questions about CTRL-SHIFT-normal key: I'm afraid here
> you/we are running into a limitation of the key reporting by terminals and
> terminal emulators. Terminals report CTRL+normal key as a value in the
> range 0x00-0x1f. libt3widget translates that internally to EKEY_CTRL + 's'
> (for your example), but what it received was a single byte: 0x13. How
> terminals handle CTRL-SHIFT-normal key is very terminal dependent. Most
> simply ignore the SHIFT key. The linux console apparently drops the key
> combination entirely, and the Cygwin terminal does something even more
> funky: it sets the top bit of the byte. The latter in a way actually makes
> some strange kind of sense, because this allows typing the control
> characters in the C1 range (0x80-0x9f).
>
> So, although I'd also love to be able to use those combinations, it is
> unfortunately not possible. Tilde attempts to do the best it can with the
> limited capabilities provided by the terminals.
Ah yes, I forgot that CTRL+letter gets mapped to actual ASCII control
characters. And for the rest it is indeed terminal dependant.
I didn't know at which level you got your keypresses, and I thought that
if it was at ncurses level, the role of ncurses/terminfo was to unify
those terminal specific things. But it doesn't really :-/
So it is either writing code to detect which terminal is used and
interpret keys accordingly, or not supporting those extended features,
indeed.
Thank you for your detailed answers :-)
Goodbye,
Stéphane.