You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: VK=0 filter in win32.py discards CJK IME composition events #6667
This assumes any event with VK=0 + modifier keys held is a "bare modifier" noise event that can be safely dropped.
Counterexample
Under Chinese/Japanese/Korean IME, pressing Shift+? produces an IME composition event with: VK=0x0000, UnicodeChar=U+FF1F, dwControlKeyState=SHIFT_PRESSED. This event IS the only delivery of the intended character — there is no follow-up event with VK≠0. The filter drops it, so CJK IME users cannot type any symbol requiring Shift.
Environment
Windows 10/11
Chinese (Simplified) IME, Microsoft Pinyin
Textual >= 2.x
Fix
Add a check that only discards events without a valid Unicode character:
if (
key_event.dwControlKeyStateandkey_event.wVirtualKeyCode==0and (notkeyorkey=="\x00")
):
continue
key is the str from chr(key_event.uChar.UnicodeChar) — if the IME produced a real character (like U+FF1F), key will be non-empty and non-null.
Activity
github-actions commentedon Jul 23, 2026
Thank you for your issue. Give us a little time to review it.
PS. You might want to check the FAQ if you haven't done so already.
This project is developed and maintained by Will McGugan. Consider sponsoring Will's work on this project (and others).
This is an automated reply, generated by FAQtory