-
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
Add context keys for platforms #54894
Conversation
👍 |
This PR will make PR #45995 obsolete |
Does this work for settings as well? Or should I make a separate issue for that? Awesome feature by the way! |
@gandalfsaxe it doesn't work for settings as they don't support when clauses, I image the solution there would look similar to language-specific settings:
I think there's an issue tracking this. |
@gandalfsaxe I opened that issue, thanks. |
@Tyriar Did this PR stop working? I can make a separate issue, but they don't seem to work for me anymore. It's like they're completely ignored now. See the following video, where I try to set a shortcut for I'm on latest 1.27 Insiders btw. |
@gandalfsaxe seems to be working for me? 😕 Does the actual keybinding work? Maybe it's an issue with the context menu? |
@Tyriar Sorry I was too quick there. I did a bit of testing, and it turned out to be quite a subtle issue not related to this PR at all - it seems to work perfectly. I tried to use ⌃⌘D as a shortcut, and it turnes out that this is an undocumented global shortcut for looking up the selected word in the macOS Dictionary app. But it doesn't show up in System Preferences -> Keyboard -> Shortcuts. Instead you have to run a terminal command and restart: https://apple.stackexchange.com/questions/22785/how-do-i-disable-the-command-control-d-word-definition-keyboard-shortcut-in-os-x It seems like some other people were affected by this in Emacs. Good to know, and bad on Apple for hiding this shortcut so thoroughly. Anyway, the Btw It seems like the issue with the context menu illustrated above is half fixed:
|
@sbatten keybindings that don't match the context are showing in the context menu? See #54894 (comment) |
@Tyriar yea, I just tested this on an old 1.22 build, it looks like the context menus and application menu ignore context for keybindings. |
Fixes #8962
This allows the following when clauses:
"when": "isLinux"
"when": "isMac"
"when": "isWindows"
"when": "!isLinux"
(isMac || isWindows)"when": "!isMac"
(isLinux || isWindows)"when": "!isWindows"
(isLinux || isMac)