zellij icon indicating copy to clipboard operation
zellij copied to clipboard

`Alt right` and `Alt f` behave identically on macOS, `Alt left` does nothing

Open alastairs opened this issue 7 months ago • 7 comments
trafficstars

Issue description

The key combination Alt right is bound to MoveFocusOrTab by default. On macOS, this key combination toggles the floating pane (bound to Alt f by default, and not bound to Alt right in my config). It does not move focus or tab, except to/from the floating pane as toggled.

Alt f and Alt right behave identically. Alt left doesn't seem to do anything. Alt up and Alt down both work as expected.

Minimal reproduction

On a Mac:

  1. brew install zellij
  2. zellij
  3. Press Alt right—floating pane is toggled on
  4. Press Alt right—floating pane is toggled off
  5. Press Alt f—floating pane is toggled on
  6. Press Alt f—floating pane is toggled off
  7. Press Alt left—nothing happens

Other relevant information

❯ zellij --version
zellij 0.42.2

I am using a MacBook Pro with a British keyboard layout.

alastairs avatar Apr 19 '25 16:04 alastairs

Have you tried a different terminal? Mine works as expected

kewaopcode avatar Apr 20 '25 03:04 kewaopcode

In WezTerm, Alt Left/Right can switch between left/right pane; but in MacOS Terminal application, it works as alastairs reported.

marcoziti avatar Apr 25 '25 09:04 marcoziti

Yes, sorry, this behaviour is observed in both Ghostty and Terminal.app. In Ghostty, I've set macos-option-as-alt to left so my left option key is alt and the right is option. When Zellij is active, both option keys combined with the right arrow toggle the floating pane.

alastairs avatar Apr 28 '25 13:04 alastairs

I came across this Stack Exchange post while looking for an alternative keybinding for skipping between words, and I'm wondering if it might help explain the behaviour. I use zsh rather than bash, but the key combinations are otherwise the same. bindkey provides the (extensive) list of key bindings although they can only be understood in conjunction with the docs of the notation.

alastairs avatar May 07 '25 15:05 alastairs

Can confirm the behavior. alt + right toggles a pane. I'd like to jump a word to the right, but I'm unsure how to configure it accordingly. Actually I'm even unsure why alt + right is toggling panes...

I'm also on MacOS + Ghostty/iTerm.

$ zellij --version
zellij 0.42.0

voigt avatar May 18 '25 19:05 voigt

Here's the discussion from the ghostty repo: https://github.com/ghostty-org/ghostty/discussions/3207 Apparently, mapping Alt+Left/Right to Alt+B/F is done to implement word jumping. You can unbind them but then you won't be able to jump words.

My workaround is to bind ToggleFloatingPanes in zellij's config.kdl to a different combination like "Alt F" instead of the default "Alt f". This keeps word jumping and prevents toggling float panes on Alt+Right.

misha-kis avatar Jun 16 '25 01:06 misha-kis

This worked for me, thanks @misha-kis !

Keybinding I configured:

keybinds {
    normal {
        unbind "Alt f"
        bind "Alt F" {  ToggleFloatingPanes; }
    }
}

voigt avatar Jun 16 '25 14:06 voigt

This worked for me, thanks @true-real-michael !

Keybinding I configured:

keybinds {
    normal {
        unbind "Alt f"
        bind "Alt F" {  ToggleFloatingPanes; }
    }
}

How to use toggle floating panes using Alt F now?

Alt + Shift + F key combination does not work for me on macOS.

sheeeng avatar Nov 04 '25 20:11 sheeeng