[issue24035] When Caps Locked, <Shift> + alpha-character still displayed as uppercase

eryksun report at bugs.python.org
Sat Apr 25 14:21:19 CEST 2015


eryksun added the comment:

> It looks like this is a bug in pyreadlines as suggested by 
> eryksun, but for a different reason.

As I said before, it reads keyboard input events at a lower level via ReadConsoleInputW, instead of calling ReadConsoleW to read the input buffer as a text stream. To elaborate, this means it has to be aware of the keyboard state, per the [KEY_EVENT_RECORD][1] dwControlKeyState. This gets passed to [make_KeyPress][2] as `state`, which in turn ignores the CAPSLOCK_ON flag.

[1]: https://msdn.microsoft.com/en-us/library/ms684166
[2]: https://github.com/pyreadline/pyreadline/blob/master/pyreadline/keysyms/keysyms.py#L116

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24035>
_______________________________________


More information about the Python-bugs-list mailing list