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

Add support for moving focus between panes with the keyboard #1910

Merged
merged 21 commits into from
Jul 17, 2019

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Jul 10, 2019

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.

…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
  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
Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mdtauk
Copy link

mdtauk commented Jul 11, 2019

Are these panes being implemented as XAML controls, or something more Win32 based?

Co-Authored-By: Dustin L. Howett (MSFT) <duhowett@microsoft.com>
Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

@zadjii-msft zadjii-msft merged commit 8d52ba0 into master Jul 17, 2019
@zadjii-msft zadjii-msft deleted the dev/migrie/f/995-navigate-pane-focuse branch July 17, 2019 14:30
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.
@ghost
Copy link

ghost commented Aug 3, 2019

🎉Windows Terminal Preview v0.3.2142.0 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The user should be able to navigate the focus of panes with the keyboard
4 participants