-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending unicode character via KEYEVENTF_UNICODE/VK_PACKET in SendInput outputs the wrong characters #12977
Comments
For reference: |
In conhost (the old terminal) this issue is caused by In Windows Terminal I've narrowed this down to being caused by the Win32 Input Mode. You can work around this issue by adding Edit: This is caused by |
We must use 65535 as `MAX_PARAMETER_VALUE` in order for us to properly parse win32-input-mode sequences, which transmit UTF-16 characters as parameters. Closes #12977 ## Validation Steps Performed * Call `SendInput` with 🙁 (`L'\xD83D'`, `L'\xDE41'`) * 🙁 appears on the input line ✅
We must use 65535 as `MAX_PARAMETER_VALUE` in order for us to properly parse win32-input-mode sequences, which transmit UTF-16 characters as parameters. Closes #12977 ## Validation Steps Performed * Call `SendInput` with 🙁 (`L'\xD83D'`, `L'\xDE41'`) * 🙁 appears on the input line ✅ (cherry picked from commit 74cdffe) Service-Card-Id: 84772549 Service-Version: 1.15
🎉This issue was addressed in #13667, which has now been successfully released as Handy links: |
🎉This issue was addressed in #13667, which has now been successfully released as Handy links: |
We must use 65535 as `MAX_PARAMETER_VALUE` in order for us to properly parse win32-input-mode sequences, which transmit UTF-16 characters as parameters. Closes microsoft#12977 ## Validation Steps Performed * Call `SendInput` with 🙁 (`L'\xD83D'`, `L'\xDE41'`) * 🙁 appears on the input line ✅ (cherry picked from commit 74cdffe) Service-Card-Id: 84772549 Service-Version: 1.15 (cherry picked from commit f3f9eba) Service-Card-Id: 84772548 Service-Version: 1.14
Windows Terminal version
1.12.10982.0
Windows build number
10.0.19043
Other Software
Reproducible in:
powershell just displays
??
, not sure which behaviour is more incorrectUses SendInput:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput
Steps to reproduce
Via SendInput, send the unicode character 🙁
E.g. in
https://github.com/jtroo/kanata/blob/master/src/oskbd/windows.rs#L168
Expected Behavior
The correct unicode value gets typed in: 🙁
Actual Behavior
The characters
翿翿
are typed in insteadAdditional info
When copy-pasting the unicode character, it's rendered correctly (in cmd/wsl). It's just not typed correctly via SendInput.
The text was updated successfully, but these errors were encountered: