Closed roblourens closed 3 years ago
Well, this was an adventure. To properly check the jupyter keybindings and other reasonable keybinding when clauses, we need to consider the notebookViewType key, editor focus keys, and jupyter's config key (because they disable these keybindings with a setting). Long story short, the strategy is to create a fake ContextKeyService that inherits from the editor's, and sets the focus-related context keys. Another strategy would have been just to extract the parts of the when clause that we care about (notebookViewType, config) and evaluate those parts, but I don't want to copy any code related to evaluating when clauses.
If we have more similar cases, we could use a strategy that would involve putting a CKS on cell VMs so we can examine their context independently of the view layer, discussed this with @rebornix.
@roblourens are there verification steps for this?
looks like #122407 regressed
Verification steps
ctrl+alt+enter
not ctrl+enter
(see https://github.com/microsoft/vscode/issues/122407)If you have customized this keybinding, then comment out your custom keybinding
@roblourens I believe that still seeing this with b4c1bd0a9b03c749ea011b06c6d2676c8091a70c
Here's with Jupyter disabled:
And then after enabling Jupyter and restarting VS Code:
The tooltip is a separate issue, filed https://github.com/microsoft/vscode/issues/125865
From https://github.com/microsoft/vscode/issues/122407
We don't actually have a way to look up the keybinding for a command with a certain context. @alexdima I want to add this capability to the keybindings service by letting
lookupKeybinding
take a CKS like thisis that ok?