I have these keybindings
{ "key": "ctrl+n", "command": "explorer.newFile", "when": "explorerViewletVisible && filesExplorerFocus && !isMac" },
{ "key": "cmd+n", "command": "explorer.newFile", "when": "explorerViewletVisible && filesExplorerFocus && isMac" },
{ "key": "ctrl+shift+n", "command": "explorer.newFolder", "when": "explorerViewletVisible && filesExplorerFocus && !isMac" },
{ "key": "cmd+shift+n", "command": "explorer.newFolder", "when": "explorerViewletVisible && filesExplorerFocus && isMac" },
{ "key": "cmd+q", "command": "-workbench.action.quit", "when": "isMac" },
{ "key": "cmd+q cmd+q", "command": "workbench.action.quit", "when": "isMac" }
Which end up showing the keybindings in menus since contexts are not considered here.


Maybe we could refine the when clause just for startup to ignore all entries except for isMac, isWindows and isLinux? For example:
explorerViewletVisible && filesExplorerFocus && !isMac
= (true) && (true) && !isMac
= !isMac
For or queries we can just assume everything is true?
terminalFocus && isWindows || terminalFocus && isLinux || filesExplorerFocus
= (true) && isWindows || (true) && isLinux || (true)
= isWindows || isLinux || true
= true
I have these keybindings
Which end up showing the keybindings in menus since contexts are not considered here.
Maybe we could refine the
whenclause just for startup to ignore all entries except forisMac,isWindowsandisLinux? For example:For or queries we can just assume everything is true?