Skip to content
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

Shortkeys - Add a "when clause" for "focus is in panel" #33672

Closed
brunetton opened this issue Sep 1, 2017 · 4 comments
Closed

Shortkeys - Add a "when clause" for "focus is in panel" #33672

brunetton opened this issue Sep 1, 2017 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label

Comments

@brunetton
Copy link

brunetton commented Sep 1, 2017

Hi all, I'm using vscode (1.15.1) for a few days and I've a very good impression about it !
However, I'm writing a simple extension and playing with interactive js shell (debug console) and I missed a keyboard shortcut to jump between text editor and panel.
The solution given in this StackOverflow thread is great for swapping between integrated terminal and code editor, but here I'm not using terminal, but debug console.

So I tried something very similar (using ctrl+e (but no matters)) and tried to add 2 rules like that :

{
    "key": "ctrl+e",
    "command": "workbench.action.focusPanel",
    "when": "editorTextFocus"
},
{
    "key": "ctrl+e",
    "command": "workbench.action.focusActiveEditorGroup",
    "when": "!editorTextFocus"
}

But this doesn't work: I can focus from the text edition to the panel, but I can't focus back. I figured out after some tests that when the focus is in panel, editorTextFocus is still true (in contrary to terminalFocus).

So, to find a solution to my problem, I need a when clause that let me know whether the focus is on panel or not. As far as I can see in vscode'code, I can't find any RawContextKey that looks like that.

Did I missed something ? (I hope I didn't opened an issue for nothing)
Thanks !

@vscodebot vscodebot bot added the terminal General terminal issues that don't fall under another label label Sep 1, 2017
@Tyriar
Copy link
Member

Tyriar commented Sep 6, 2017

Duplicate of #19400

@Tyriar Tyriar marked this as a duplicate of #19400 Sep 6, 2017
@Tyriar Tyriar closed this as completed Sep 6, 2017
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 6, 2017
@brunetton
Copy link
Author

brunetton commented Sep 7, 2017 via email

@Tyriar
Copy link
Member

Tyriar commented Sep 7, 2017

Ah, I don't think we want to make the shortcuts toggle between the editor and the panels by default but do as described in #19400. You're always free to add your own keybinding tweaks like this though.

@brunetton
Copy link
Author

brunetton commented Sep 7, 2017 via email

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

2 participants