Repository navigation
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! |
|
Gandalf Saxe (@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. |
|
Daniel Imms (@Tyriar) That makes sense. That'd be really great to have! I don't think there is an existing issue. The only I could find was #5595, which was closed with reference to the very issue this PR fixed, #8962. Unless you can find a relevant issue, I'll make a new one shortly 🙂 |
|
Gandalf Saxe (@gandalfsaxe) I opened that issue, thanks. |
|
Daniel Imms (@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. |
|
Gandalf Saxe (@gandalfsaxe) seems to be working for me? 😕 Does the actual keybinding work? Maybe it's an issue with the context menu? |
|
Daniel Imms (@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:
|
|
SteVen Batten (@sbatten) keybindings that don't match the context are showing in the context menu? See #54894 (comment) |
|
Daniel Imms (@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)