-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Keybinding for "Toggle Integrated Terminal" keeps resetting to Ctrl+^ #26506
Comments
@bpasero Just had the same conversation two days ago with @joaomoreno :) Most likely, here is what is happening:
The root causeChromium flips int ISOKeyboardKeyCodeMap(int nativeKeyCode) {
// OS X will swap 'Backquote' and 'IntlBackslash' if it's an ISO keyboard.
// https://crbug.com/600607
switch (nativeKeyCode) {
case kVK_ISO_Section:
return kVK_ANSI_Grave;
case kVK_ANSI_Grave:
return kVK_ISO_Section;
default:
return nativeKeyCode;
}
}
DomCode DomCodeFromNSEvent(NSEvent* event) {
if (KBGetLayoutType(LMGetKbdType()) == kKeyboardISO) {
return ui::KeycodeConverter::NativeKeycodeToDomCode(
ISOKeyboardKeyCodeMap([event keyCode]));
}
return ui::KeycodeConverter::NativeKeycodeToDomCode([event keyCode]);
} The above Chromium code makes it that Our workaroundOur workaround is a bit complex, because we simply cannot detect when Chromium does the swap. The To make matters worse, we cannot hook into Chromium and unswap the Our solution therefore consists of us polling on Most likely, in your case, since the laptop has a built-in ANSI keyboard, initially, the value for All in all, when you switch from one different physical keyboard type to another, by pressing a key, it will take us ~3s to pick that up and begin working around Chromium's swapping. IMHO we should create an Electron issue and ask them to delete the swapping inside Chromium so we don't have to do this crazy workaround. The reason Chromium swaps the scan code might make sense for a browser page, but does not make sense for a desktop application. Would be great if you want to file such an issue to Electron. Also see #24153 |
@alexandrudima thanks, yeah I do remember this because we looked both into it last end game and I was aware of it when I filed the issue, however something else must be going wrong: This issue happens after VS Code has long been started and after I had typed already quite a bit so I would expect your polling logic to have determined everything by then. I am also not changing keyboards or so in this process. As far as I can tell, at one point I can no longer toggle the integrated terminal via |
This issue has been closed automatically because it needs more information and has not had recent activity. Please refer to our guidelines for filing issues. Thank you for your contributions. |
I will reopen this bug if it is not fixed in latest insider. |
I am on macOS with a german keyboard layout and I want to open the integrated terminal with
Ctrl+<the key above Alt key>
. For that I am assigning that key and the output I see isCtrl+[Backquote]
. When I set this it seems to work until I reload the window where it then stops to work.The text was updated successfully, but these errors were encountered: