-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Should panel toggle keybindings focus instead of toggle when the panel is not active? #19400
Comments
I believe this should be the default behavior because it aligns with user intent: no matter where I'm at in the editor, if I hit the hotkey it should bring me to the respective panel. If I'm already there I probably want to toggle it. |
I am ok changing this, the sidebar behaves the same (focus in when not focussed and invoking the keybinding). As long as we provide a way to configure the old behaviour. |
Should be changed, yes. I'm using almost exclusively using Consistency with the sidebar would be a big plus 👍 |
I am fine with changing this to behave like the sidebar. Especially if the users seem to prefer this. They can always use cmd + J to toggle |
This was brought up already before - #7540 |
+1 for the change. |
I cannot emphasize how many times I have had to invoke the shortcut twice solely to regain focus on the terminal. Definitely a usability flaw |
@isidorn to be clear I'm proposing a conditional focus though so it would not be consistent with the sidebar, just a little more like the sidebar's behavior. |
Personally, i would just like to switch cursor between terminal and editor without hiding terminal. This setting works for me. |
This keybinding works in v1.15.0 ctrl+Alt+' However, it's one of the most awkward key combinations ever! |
@dbaeumer @isidorn @sandy081 this is currently blocked on I'd be happy to make the keybinding changes after the contexts are implemented. |
@bpasero I'm not suggesting adding another command, rather adding new default keybindings:
This doesn't really solve the problem though imo, I use ctrl/cmd+1 when I want to switch back to the editor personally. The above keybindings just makes it nicer to work with the terminal such that you don't need to trigger toggle terminal twice if it's already visible. I often recommend people use this setup for toggle terminal and I've only heard positive feedback. |
@Tyriar I still dislike the fact that viewlets behave differently from panels |
@Tyriar I have a change ready in c7b740f that would change every panel toggle action to behave as outlined in #19400 (comment). I do not think we can just fix this via changing our default keybindings, because what about people that have changed the keybindings manually? |
@bpasero looks ok, one thing to keep in mind is that doing it this way makes you unable to hide the panels via the command palette. You can still use "toggle panel", but "toggle terminal" will actually focus the terminal since the command palette was focused. |
Good point, I suggest we talk about this in the UX call. |
The behaviour of the commands for toggling panels has changed as outlined in #19400 (comment). To get back the previous behaviour, simply configure a keybinding to close the panel when the related panel is active, e.g. for output: {
"key": "cmd+shift+u",
"command": "workbench.action.closePanel",
"when": "activePanel==workbench.panel.output"
} The list of panel identifiers is:
|
Verification: see #19400 (comment) |
Wow, not sure how I did not test that. Fixed, thanks! |
I found the link to this issue in release notes for the 1.28.2 release and I like the way how ctrl + ` behaves now. I also was annoyed by the fact that I have to type terminal shortcut twice if I want to move back to the terminal. But what shortcut can I use to move back from the terminal to an editor? I mean, I don't want to close a terminal panel. I want to leave it open and switch focus to an editor. A use case for this would be the following: I will write in the editor a code that depends on the result of a teminal command that I just run. So I want to move focus from terminal to an editor and leave terminal open. |
@plagov just add a custom shortcut to this command |
@plagov try |
Currently all the panel toggle commands hide the respective panel when it's visible and show it when it's hidden. I find this annoying though and instead use the following custom keybinding:
This overrides the setting when the terminal does not have focus to simply focus it, but retain the hide behavior when it is focused. This means you don't have to hit ctrl+` twice in order to get focus to the terminal when it's already displayed but not focused. This does change the hiding the terminal case when it's not focused to need 2 ctrl+`'s but personally I hardly ever do this compared to switching focus from the editor to the terminal.
I frequently tell users about my config and they all react positively so I'm wondering whether we should make this the default behavior for all panels (to keep them consistent).
/discuss
The text was updated successfully, but these errors were encountered: