Let's say I'm in VSCode (e.g. in the screenshot below in a Python interactive window), I'd like to define keybindings that only apply to a specific window type (e.g. Window 1, 2 or 3 in the screenshot below, which are window types for Python interactive development)
How can I look up the current context when the cursor is focused on any of them, so that I can use that in a when
clause in my keybindings.json
?
Note that in the example above, these are Python-extension-specific window types, namely:
- Python interactive window
- Plot Viewer
- Variable explorer and data viewer
- etc