-
Notifications
You must be signed in to change notification settings - Fork 1.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
altgr+num prints wrong character on French azerty keyboard #2479
Comments
Might be related to #2151 |
All keyboard event handling code is in this file: |
@Tyriar What kind of help are you looking for? (In case I would be capable of.) |
@willemavjc someone needs to investigate why the extra character gets printed (in Keyboard.ts) as since the monaco text editor doesn't we should be able to avoid the problem too. There may be something else on KeyboardEvent that we need to be looking at? |
I've been able to reproduce this on all dead keys that require using the AltGr key, including on the BÉPO keymap, which is a French DVORAK keyboard. There is probably a missing I'm unfamiliar with the TypeScript language but the exact cause may be found by debugging the Keyboard.ts file |
Also, I just found out that typing Ctrl+Alt and then the key works fine, as AltGr is some sort of alias for Ctrl+Alt on Windows. To recap:
There's definitely something wrong with how the AltGr key is handled |
@utybo Well if you want to help digging into this (we cannot as we all use QWERTY derived layouts - English and German), maybe this comes handy https://w3c.github.io/uievents/tools/key-event-viewer.html. We kinda rely on the reported stuff from the events shown there, not sure yet how AltGr on AZERTY plays into that. |
@utybo So this page reports the correct values? If so the problem is prolly on our side (already thought that in the first place). Well in Keyboard.ts happens some magic and even worse, almost no comments. Its abit hard to start there somewhere without breaking something else. If you are still up to - go for it :) |
Strangely enough, I'm unable to replicate this using the sources. It works perfectly fine when using the local webserver that's launched with yarn. Maybe VS Code is using an older version? |
Trying this issue now on my work PC and it seems fine 😕 (using on screen keyboard) |
|
@utybo pretty sure I tested it at home using the on-screen keyboard and could repro though 🤔 |
Even with a physical keyboard sometimes it works perfectly fine, but most of the time the bug is here. This whole issue is kind of confusing. |
Please try to narrow the circumstances - maybe its related to how you start vscode? Does it only happen in the terminal or does the editor show the same weird behavior? Which OS + version? Is the keyboard layout correctly set up in the OS? |
I honestly have no idea. Sometimes the issue just does not exist but that's fairly rare. I am able to reliably repro this on my two PCs:
The keyboard layout is the basic one from Windows. |
@jerch As stated in microsoft/vscode#82489 it only appears in the Terminal section of VSCode editor. No issue in the Code section or anywhere else in the editor. Whatever is the underlying shell (PowerShell, git-bash, etc.), it is affected. And that same shell outside of VSCode works perfectly fine. |
@Tyriar Not sure how to approach this - it seems to be a random on/off problem. Since a computer is still a deterministic machine there is some hidden root cause imho. @willemavjc, @utybo Can you confirm that this never happens in the xterm.js demo, only in vscode terminal? |
I confirm that it never happens in the xterm.js demo and only in the vs code terminal, even when trying really hard with things like alternative keymaps. @jerch As for the "random on/off problem", I'd say the issue happens 90% of the time on my sad. Just know that you can't use the onscreen keyboard to try this (it handles AltGr differently): as far as I've tried it has to be the actual AZERTY keymap on your keyboard. |
Tried on home PC, it seems to happen 100% of the time on both vscode and the xterm.js demo |
I think we need to move to |
Kinda summing things up: Environment used:
Additional test with on-screen AZERTY keyboard:
Additional test with xterm.js demo:
Using Keyboard Event Viewer website results in the same screenshots as @utybo pointed here. Tests done with Brave browser (means Chromium). @utybo statement must be right: @Tyriar @jerch @rebornix Would not be this the easy clue in the end? Mapping |
@willemavjc I think we've identified the cause is that we're not using input (plus Chrome might have a bug where it's not flagging the key as dead on |
@Tyriar Okay. If you need some sort of testing or such, just let me know. I'll be happy to help. |
I think our key event source code is stuck between the old paradigms (a really bad hack of |
I can't reproduce this anymore 🤔 Does anyone else still have this issue? |
I just tried on both vscode insider and xterm.js and I still have this issue. |
I have this problem as well. Still hoping for a fix... such a pain for foreign speakers. |
If anyone wants to tackle this, plz see my last comment in PR #2976. |
Looks like it's fixed in #2151 |
My problem is with a qwerty keyboard, im french canadian and my windows is in english. I dont know how to have both my prints and loaded txt files show french accents "ÉÉÀÀÈÈ" |
VS Code issue: microsoft/vscode#82489
Using French (France) AZERTY keyboard
Expected:
Actual:
This does not happen in monaco or other apps.
The text was updated successfully, but these errors were encountered: