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

Fixes Default Keybinds in Resize Mode #440 #441

Merged
merged 1 commit into from
May 3, 2021

Conversation

a-kenji
Copy link
Contributor

@a-kenji a-kenji commented May 3, 2021

Closes #440

Changes arrow keybinds from switching focus
to resizing.

@a-kenji a-kenji force-pushed the fix-default-keybinds branch from 6f0e861 to 2a70552 Compare May 3, 2021 08:01
@imsnif
Copy link
Member

imsnif commented May 3, 2021

@a-kenji - I think this is not right. In Pane mode it needs to be normal arrows (not alt). This is also true to Tab and Scroll. Normal arrows should behave just like hjkl in those cases. Alt should remain the same in all modes

@imsnif
Copy link
Member

imsnif commented May 3, 2021

(the alt case is a little weird and doesn't work 100% when another non-alt shortcut with the same key is bound... so it's okay if they just work in normal mode actually)

Sorry for being hectic, just wanted to chime in before the merge :)

@a-kenji
Copy link
Contributor Author

a-kenji commented May 3, 2021

Thanks for checking over this!
I think you got mixed up in the keybindings:

This is the current pane mode:

 - action: [MoveFocus: Left,]
          key: [ Char: 'h', Left,]
        - action: [MoveFocus: Right,]
          key: [ Char: 'l', Right,]
        - action: [MoveFocus: Down,]
          key: [ Char: 'j', Down,]
        - action: [MoveFocus: Up,]
          key: [ Char: 'k', Up,]

This is the current resize mode:

      - action: [Resize: Left,]
          key: [Char: 'h', Left,]
        - action: [Resize: Down,]
          key: [Char: 'j', Down,]
        - action: [Resize: Up,]
          key: [Char: 'k', Up, ]
        - action: [Resize: Right,]
          key: [Char: 'l', Right,]

@a-kenji
Copy link
Contributor Author

a-kenji commented May 3, 2021

@imsnif
No problem this is good input, we want the default configuration to be correct!

Ah, now I understand what you mean with the alt.

@imsnif
Copy link
Member

imsnif commented May 3, 2021

True, my bad! I only looked at it very quickly :) Sorry!

Additionally though: the arrow keys don't work in tab/scroll mode. Maybe we can also fix them as part of this?

@a-kenji
Copy link
Contributor Author

a-kenji commented May 3, 2021

I like that idea,
In Scroll Mode: Up/Down Lines, and Right/Left Page?

In Tab Mode: Left/Right: Next/Previous Tab?
Do you got any idea for the Up Keys?

Or other ideas?

@imsnif
Copy link
Member

imsnif commented May 3, 2021

That sounds cool :) I would just be happy if scroll up/down arrow and tab left/right arrows work - but these also sound great.

@a-kenji a-kenji force-pushed the fix-default-keybinds branch from 2a70552 to 49698df Compare May 3, 2021 10:24
Closes zellij-org#440

Changes arrow keybinds from switching focus
to resizing.

Add arrow parity keybinds to scroll and tab modes.
@a-kenji a-kenji force-pushed the fix-default-keybinds branch from 49698df to 118e5a1 Compare May 3, 2021 10:26
@a-kenji
Copy link
Contributor Author

a-kenji commented May 3, 2021

I tried adding the parity to the scroll and tab mode, could you please do a sanity check on that?

@imsnif
Copy link
Member

imsnif commented May 3, 2021

LGTM! 👍

@a-kenji a-kenji merged commit 570ee31 into zellij-org:main May 3, 2021
@a-kenji a-kenji deleted the fix-default-keybinds branch May 3, 2021 12:44
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.

Bug: Resize with ctrl+R only switches between panes and does not resize with arrow keys (v0.6.0)
2 participants