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

Marko Rauhamaa marko at
Thu Jul 9 22:42:26 CEST 2015

Skip Montanaro <skip.montanaro at>:

> 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.

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).


More information about the Python-list mailing list