-
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
Extra character inserted when writing ~ or ` with vscode and french keyboard layout #391
Comments
Note that it doesn't happen if I disable conpty. |
I've filed MSFT:20921862 internally to make sure this gets investigated. |
I don't know where the issue is in the stack, but just in case, it's still present with Terminal app (master, checked yesterday). |
Using Danish keyboard results in invisible character being inserted when using alt gr to compose letters.
In practice I've had to switch to other terminals to use | (pipes) and vim, as it exists insert mode whenever I compose with alt gr. |
I cannot use any characters composed with ALT GR.. including @ and [ ] |
still present vscode 1.38.1 |
My basic idea was that `WM_CHAR` is just the better `WM_KEYDOWN`. The latter fails to properly support common dead key sequences like in #3516. As such I added some logic to `Terminal::SendKeyEvent` to make it return false if the pressed key represents a printable character. This causes us to receive a character event with a (hopefully) correctly composed code unit, which then gets sent to `Terminal::SendCharEvent`. `Terminal::SendCharEvent` in turn had to be modified to support potentially pressed modifier keys, since `Terminal::SendKeyEvent` isn't doing that for us anymore. Lastly `TerminalInput` had to be modified heavily to support character events with modifier key states. In order to do so I merged its `HandleKey` and `HandleChar` methods into a single one, that now handles both cases. Since key events will now contain character data and character events key codes the decision logic in `TerminalInput::HandleKey` had to be rewritten. ## PR Checklist * [x] CLA signed * [x] Tests added/passed * [x] I've discussed this with core contributors already. ## Validation Steps Performed * See #3516. * I don't have any keyboard that generates surrogate characters. Due to this I modified `TermControl::_SendPastedTextToConnection` to send the data to `_terminal->SendCharEvent()` instead. I then pasted the test string ""𐐌𐐜𐐬" and ensured that the new `TerminalInput::_SendChar` method still correctly assembles surrogate pairs. Closes #3516 Closes #3554 (obsoleted by this PR) Potentially impacts #391, which sounds like a duplicate of #3516
Yes, this was fixed by #4192. Verified in VSCode, Putty, and Terminal. VSCode now produces |
FWIW: I can't even reproduce this with the original inbox console host. Perhaps this was always VS Code's fault. |
Your Windows build number: My build is : Microsoft Windows [version 10.0.18362.1]
Using vscode 1.32.3 with conpty enabled.
What you're doing and what's happening:
When trying to type some specific character with a french keyboard layout, an extra character ("é") is added. For now I spotted 2 characters, ~ and
. More precisely, if I press "alt gr" and 2 at the same time, a "é" is added. If I then press space, then I have "é~" in the prompt. If I press "alt gr" and seven at the same time, a "é" is added. If I then press space, then I have "é
" in the prompt.What should happen is that no ~ is added.
The text was updated successfully, but these errors were encountered: