-
Notifications
You must be signed in to change notification settings - Fork 29.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
Command-/ with Dvorak keyboard on Mac OS X no longer comments/uncomments #1492
Comments
I have this exact same problem! The keybindings.json tells me i have to use a different shortcut for my current keyboard layout (cmd+z) but that does not work (it still undo's). Changing my keyboard layout does not work either, the keybindings.json comes up with different but still wrong suggestions. |
@erichocean @mathiasvr Sorry about that! This might be caused by our code that work arounds Chromium's implementing a w3c section only on Mac: https://github.com/Microsoft/vscode/blob/39602b3adbb50945fd8fe70017a2ffbd3000a477/src/vs/workbench/services/keybinding/electron-browser/nativeKeymap.ts#L204 How can I try to reproduce on a qwerty keyboard? is there a dvorak kb layout setting on the mac (I'm not usually working on a mac)? |
Yes i'm actually on a physical qwerty keyboard as well, in keyboard settings you can add dvorak as input source. |
@erichocean @mathiasvr There is indeed a difference between 0.10.4 and 0.10.5 The difference is that starting with 0.10.5 we have code in that reverts a questionable feature implemented by Chromium only on the mac -- B.2.4 Optionally fixed virtual key codes. This is in the w3c spec to support "legacy content expecting US-English keyboard layout", which is not the case with VS Code. We had to revert this feature because it caused keyboard input to be unreliable -- please see #1302 for an example on how this issue manifests itself. I have checked on @isidorn mac that we do the right thing. i.e. when you open the default keybindings we inform that you must press Please read further about different keyboard layouts in the documentation Also, what would be needed to give a better user experience would be to be able to contribute keybindings based on keyboard layouts as asked in #1240 |
@alexandrudima The screenshot you posted is incorrect. Command-Z on the Mac is "Undo". Seriously, try it: it'll run the Undo command, not the That said, I was able to follow the other links and revive the main commands I was missing, in a custom
That's all I needed to get back to normal productivity in the editor. Thanks! P.S. Since someone went through all the effort to figure out that the key commands are wrong and display the custom UI gizmo, why not just fix them? I mean, if I can do it manually…why not just do it automatically? The editor is basically broken right now without the manual fixes. You can still display the correct key-sequence in the UI (now that you've got the code to do that…). |
@erichocean I will look again into this as soon as I get my hands on a mac. |
It looks like VSCode tries to preserve the physical shortcut key. The toggle line comment shortcut is This is why rebinding to I don't think the shortcuts should reflect the physical keyboard. They should match the keyboard layout. I know what physical key to press to trigger a |
{ "key": ".", "command": "^acceptSelectedSuggestion",
"when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey && editorLangId == 'typescript'" }, Suggests: Really? Someone thought that was a solution? |
I went through and remapped all keybindings to DVORAK suggestions. Here's my But agree with @HookyQR – this is a really piss poor solution for folks with alternative keyboards. If you can detect what the shortcut should be, just swap it :/
|
@chexee thanks for this! I find this still to be incredibly confusing. I can't have my dvorak-layout For some reason, VSCode detects that Update: for now, I've mapped |
I actually gave up on mapping. The above still didn't cover everything and the experience for dvorak is just taking too much time to make right. I probably won't switch until this is handled better. |
Would using event.key be better? Does Monaco support any browsers that don't fully support it? That might eliminate a fair amount of code in keyCodes.ts, and enable keybindings like |
Is there anything I can to do push for getting a real fix? vscode is effectively unusable w/ Dvorak and other non-physical layouts. Patreon? |
This seems to work for me on a fresh Sierra + VS Code install. Could it be a conflict with pre-existing configuration in the settings folder? Even the |
For those of you still having issues, you can drop the 'fix' by editing the app code as I've mentioned here: #15624 (comment) I've put in a PR (#15687) to remove the re-mapping altogether, since it is effectively useless, we'll see how that goes. |
I have validated that we now (i.e. after PR #22894 aka #17521 -- in today's upcoming Insiders build) appear to behave correctly for this keyboard layout Analysis of default keybinding for
|
I have just tried the latest version of VS Code and the latest Insiders build and this isn't behaving as expected with the Dvorak - QWERTY layout. Mac's built in Dvorak - QWERTY layout allows typing in DVORAK, but reverts to QWERTY when holding command so you don't have to reach all the way across the keyboard to do common actions like copy and save. VS Code is undoing all of Mac's work and returning the keyboard shortcuts back to Dvorak. |
@Tsmith18256 I don't believe that's the default action on a Mac, I use DVORAK and actually get quite annoyed with any apps that would switch back to QWERTY with the modifier keys (I don't use any apps regularly that do that) |
@jdavidbakr Not DVORAK, "Dvorak - QWERTY." It's another layout that's only available on Mac and one of my favourite parts about Mac over Windows/Linux. |
It's not default action, it's a keyboard you can enable via MacOS.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Tyler Smith <[email protected]>
Sent: Tuesday, April 25, 2017 6:22:12 AM
To: Microsoft/vscode
Cc: Chelsea Otakan; Mention
Subject: Re: [Microsoft/vscode] Command-/ with Dvorak keyboard on Mac OS X no longer comments/uncomments (#1492)
@jdavidbakr<https://github.com/jdavidbakr> Not DVORAK, "Dvorak - QWERTY"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1492 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AARcjASQfwyvA7eLwiaxF1GJlmBX4AU5ks5rzXT0gaJpZM4G4t5m>.
|
@chexee Yeah exactly, and the issue is that I have it enabled and VS Code is ignoring it. On every program on my computer I press the QWERTY versions of Ctrl-C for copy, Ctrl-Z for undo, etc. In VS Code, I have to press the Dvorak versions, even though I enabled Dvorak - QWERTY, which means reaching way across the keyboard for really common actions. |
Yeah. Until VS Code can map to the native keyboard mappings, stuff like this will keep coming up.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Tyler Smith <[email protected]>
Sent: Tuesday, April 25, 2017 6:37:58 PM
To: Microsoft/vscode
Cc: Chelsea Otakan; Mention
Subject: Re: [Microsoft/vscode] Command-/ with Dvorak keyboard on Mac OS X no longer comments/uncomments (#1492)
@chexee<https://github.com/chexee> Yeah exactly, and the issue is that I have it enabled and VS Code is ignoring it. On every program on my computer I press the QWERTY versions of Ctrl-C for copy, Ctrl-Z for undo, etc.
In VS Code, I have to press the Dvorak versions, even though I enabled Dvorak - QWERTY, which means reaching way across the keyboard for really common actions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1492 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AARcjILDuKYW8ehkL8FYS7kJ5SSfUVk-ks5rziFmgaJpZM4G4t5m>.
|
Yep, would have been easier if they just did the breaking change like I suggested originally. Broke a bunch of other stuff anyway. Oh well. ¯_(ツ)_/¯ |
There exists a workaround for the "Dvorak - QWERTY" keyboard layout explained in #23964. i.e. |
Now it "outdents." There are a few other potentially related oddities, such as Command-[ causing the text to get smaller, and Command-] causing the text to get larger.
If I had to guess, someone change the key-mapping code to work off of key codes and not characters, so it think it's using a QWERTY keyboard, even though it's not.
This worked prior to the latest update (broken version is 0.10.5 dfc08dc).
The text was updated successfully, but these errors were encountered: