-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
(GPUI on Windows) Zed assumes keycodes originate from US Keyboards, causing mismatches in characters #12811
Comments
After some digging, I have found a similar issue online. The important part is that keycodes can refer to different characters on different platforms. I have found the line of code that assigns the keycode of Here is a line of code where GPUI interprets the zed/crates/gpui/src/platform/windows/events.rs Line 1272 in e829a8c
|
I think the intended way to do this on windows would be to use the Though I am not experienced with the win32 api, I've found a crude way to replace the match statement that seems to fix the issue: char::from_u32(MapVirtualKeyW(code as u32, MAPVK_VK_TO_CHAR)).map(String::from) I will start working on a pull request. |
Release Notes: - Fixed Zed/GPUI misinterpreting keycodes on non-US keyboards ([#12811](#12811)). --------- Co-authored-by: Marshall Bowers <[email protected]> Co-authored-by: Mikayla Maki <[email protected]>
I wonder if this is also causing: |
Check for existing issues
Describe the bug / provide steps to reproduce it
I am using a keyboard with a British ISO layout. I am having issues with the following characters:
'
~
`
When I am typing them into the buffer, they work as usual. However when trying to use keymaps with them, they do the actions of other binds:
ctrl-
'
-> ctrl-~
ctrl-
~
-> ctrl-'
ctrl-
`
->Nothing
When testing, it seems that https://www.keyboardtester.com/tester.html recieves my inputs just like Zed does when handling keymaps, pressing
'
returns~
,~
returns'
and`
doesn't even show up.Environment
Zed: v0.140.0 (Zed Dev e829a8c)
OS: Windows 10.0.22631
Memory: 31.8 GiB
Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.No response
The text was updated successfully, but these errors were encountered: