Add support for moving focus between panes with the keyboard#1910
Merged
zadjii-msft merged 21 commits intomasterfrom Jul 17, 2019
Merged
Add support for moving focus between panes with the keyboard#1910zadjii-msft merged 21 commits intomasterfrom
zadjii-msft merged 21 commits intomasterfrom
Conversation
…e size, but doesn't resize down. I also had to remove the seperator. I think I need to have the resize event start from the top, then recurse down
* Works for both vertical and horizontal splits * seperator is visible too * resizing the window works right
If you add keybindings for resizing, like so:
```json
{
"command" : "resizePaneDown",
"keys" :
[
"alt+shift+down"
]
},
{
"command" : "resizePaneLeft",
"keys" :
[
"alt+shift+left"
]
},
{
"command" : "resizePaneRight",
"keys" :
[
"alt+shift+right"
]
},
{
"command" : "resizePaneUp",
"keys" :
[
"alt+shift+up"
]
},
```
Then you can now resize the panes, 5% at a time.
We correctly traverse the tree to find the separator that's closest to the
focused pane (depth-wise), but also the correct direction.
I need the padding fix however
…sizable-panes # Conflicts: # src/cascadia/TerminalApp/AppKeyBindings.cpp # src/cascadia/TerminalApp/AppKeyBindings.h # src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp
But that might always have been broken
Also add comments
it works though
…vigate-pane-focuse
This is blocked on #991 getting in first.
…sizable-panes # Conflicts: # src/cascadia/TerminalApp/App.cpp
…sizable-panes # Conflicts: # src/cascadia/TerminalApp/App.cpp
…-navigate-pane-focuse # Conflicts: # src/cascadia/TerminalApp/App.cpp # src/cascadia/TerminalApp/Pane.h
…vigate-pane-focuse # Conflicts: # src/cascadia/TerminalApp/App.cpp # src/cascadia/TerminalApp/App.h # src/cascadia/TerminalApp/AppKeyBindings.cpp # src/cascadia/TerminalApp/AppKeyBindings.h # src/cascadia/TerminalApp/AppKeyBindings.idl # src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp # src/cascadia/TerminalApp/Pane.cpp # src/cascadia/TerminalApp/Pane.h # src/cascadia/TerminalApp/Tab.cpp # src/cascadia/TerminalApp/Tab.h
zadjii-msft
commented
Jul 10, 2019
miniksa
approved these changes
Jul 11, 2019
Member
miniksa
left a comment
There was a problem hiding this comment.
I don't see anything beyond what Dustin commented on. So I'll sign to not block and he can be the second when you finish his comments.
|
Are these panes being implemented as XAML controls, or something more Win32 based? |
Co-Authored-By: Dustin L. Howett (MSFT) <[email protected]>
This was referenced Jul 16, 2019
mcpiroman
pushed a commit
to mcpiroman/terminal
that referenced
this pull request
Jul 23, 2019
…ft#1910) Enables the user to set keybindings to move focus between panes with the keyboard. This is highly based off the work done for resizing panes. Same logic applies - moving focus will move up the panes tree until we find a pane to move the focus to.
|
🎉 Handy links: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Enables the user to set keybindings to move focus between panes with the keyboard.
References
See #1000 for panes megathread
PR Checklist
Detailed Description of the Pull Request / Additional comments
This is highly based off the work done for resizing panes. Same logic applies - moving focus will move up the panes tree until we find a pane to move the focus to.
Validation Steps Performed
Opened a bunch of panes, kept moving focus.