Readline -- cannot bind to both Ctrl-tab and tab at the same time?

Michael Torrie torriem at gmail.com
Fri Jul 10 00:56:05 EDT 2015


On 07/09/2015 02:42 PM, Marko Rauhamaa wrote:
> Skip Montanaro <skip.montanaro at gmail.com>:
> 
>> It makes perfect sense to me that TAB and Ctrl-TAB would generate the
>> same keycode, as TAB is itself a control character (Ctrl-I). As the
>> Ctrl modifier bit is effectively already set, I don't think you can
>> really set it a second time and be able to detect it.
> 
> If you input a character stream, that's the case since the characters
> are Unicode code points. AFAIK, Unicode doesn't have Ctrl-TAB as a
> separate code point.

Yes and readline works on character streams, not with X11.
> 
> However, X11 key events come with modifiers. Thus, CAPS-A, LeftShift-A,
> RightShift-A, CAPS-LeftShift-RightShift-A and the plain A are different
> key events (provided the physical keyboard plays along).

Not relevant to libreadline, unfortunately.



More information about the Python-list mailing list