-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
AltGr/DeadKey + Space was broken - FIXED IN 1.20.10572.0 #16641
Comments
Hmm |
Yeah, sorry. That's almost certainly a result of PR #16511. We're treating Space as a "functional" key, which means it gets hardcoded VT mappings which take precedence over the keyboard layout. It's not modal, though, so it's possible it could be handled as a regular "graphic" key. However, I have a sneaking suspicion that could break another keyboard layout, and that's why I put it with "functional" keys in the first place. But that may have been an old issue that was resolved in one of my many rewrites. I'll need to do some testing to double check. |
Unfortunately it's not a simple fix. The reason I chose to handle it as a "functional" key was because the mapping for Ctrl+Space on a number of keyboard layouts is just Not that that's impossible to fix, but it's likely to be messy. |
Hello, I just noticed Windows Terminal Preview has the experimental profile option |
Hi. |
Yeah, if you're using zsh, I believe it sets the terminfo Other than manually rebinding the keys, as @mveroone suggested, another way you might work around the issue is by patching the
I know almost nothing about zsh, though, so I have no idea what other issues that might cause, but in my brief testing it seemed to work. I also noticed that ohmyzsh has an open PR to ditch their |
This fixes two issues where the `Space` key wasn't being handled correctly: * Keyboards with an `AltGr`+`Space` mapping were not generating the expected character. * Pressing a dead key followed by `Space` is supposed to generate the accent character associated with that key, but it wasn't doing so. ## References and Relevant Issues These were both regressions from the keyboard refactor in PR #16511. ## Detailed Description of the Pull Request / Additional comments The problem was that we were treating `VK_SPACE` as a "functional" key, which means it gets hardcoded VT mappings which take precedence over whatever is in the keyboard layout. This was deemed necessary to deal with the fact that many keyboards incorrectly map `Ctrl`+`Space` as a `SP` character, when it's expected to be `NUL`. I've now dropped `VK_SPACE` from the functional mapping table and allow it be handled by the default mapping algorithm for "graphic" keys. However, I've also introduced a special case check for `Ctrl`+`Space` (and other modifier variants), so we can bypass any incorrect keyboard layouts for those combinations. ## Validation Steps Performed I couldn't test with a French-BEPO keyboard layout directly, because the MS Keyboard Layout Creator wouldn't accept a `Space` key mapping that wasn't whitespace. However, if I remapped the `AltGr`+`Space` combo to `LF`, I could confirm that we are now generating that correctly. I've also tested the dead key `Space` combination on various keyboard layouts and confirmed that that is now working correctly, and checked that the `Ctrl`+`Space` combinations are still working too. Closes #16641 Closes #16642
Did this stuff get released yet? I feel like a damned idiot every time a switch to a terminal! |
This fixes two issues where the `Space` key wasn't being handled correctly: * Keyboards with an `AltGr`+`Space` mapping were not generating the expected character. * Pressing a dead key followed by `Space` is supposed to generate the accent character associated with that key, but it wasn't doing so. ## References and Relevant Issues These were both regressions from the keyboard refactor in PR #16511. ## Detailed Description of the Pull Request / Additional comments The problem was that we were treating `VK_SPACE` as a "functional" key, which means it gets hardcoded VT mappings which take precedence over whatever is in the keyboard layout. This was deemed necessary to deal with the fact that many keyboards incorrectly map `Ctrl`+`Space` as a `SP` character, when it's expected to be `NUL`. I've now dropped `VK_SPACE` from the functional mapping table and allow it be handled by the default mapping algorithm for "graphic" keys. However, I've also introduced a special case check for `Ctrl`+`Space` (and other modifier variants), so we can bypass any incorrect keyboard layouts for those combinations. ## Validation Steps Performed I couldn't test with a French-BEPO keyboard layout directly, because the MS Keyboard Layout Creator wouldn't accept a `Space` key mapping that wasn't whitespace. However, if I remapped the `AltGr`+`Space` combo to `LF`, I could confirm that we are now generating that correctly. I've also tested the dead key `Space` combination on various keyboard layouts and confirmed that that is now working correctly, and checked that the `Ctrl`+`Space` combinations are still working too. Closes #16641 Closes #16642 (cherry picked from commit ec91be5) Service-Card-Id: 91738880 Service-Version: 1.20
Windows Terminal version
1.20.10303.0
Windows build number
10.0.22635.3130
Other Software
WSL 2.1.1.0
Steps to reproduce
Expected Behavior
It should type an underscore, since AltGr + Space is the mapping for _ in FR bepo layout.
Actual Behavior
Rings the system bell. Worked fine in Terminal 1.18
The text was updated successfully, but these errors were encountered: