zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.93k stars 666 forks source link

Zellij hijacks "ctrl+shift+right" and "alt+shift+right" keybindings defined in iTerm2 #3769

Open cmontemuino opened 1 week ago

cmontemuino commented 1 week ago

Basic information

zellij --version: zellij 0.41.1

stty size: 63 237

uname -av or ver(Windows): Darwin hostname 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000 arm64

Further information

Reproduction steps, noticeable behavior, related issues, etc

2. Issues with the Zellij UI / behavior / crash

It does not matter how I configure the Rebind leaders. It's completely the same using Ctrl as primary + Alt as Secondary or the other way around.

Whatever the configuration, when I hit one of the mappings defined for iTerm2, I experience a floating pane toggle, even with the interface locked.

cmontemuino commented 1 week ago

I found a workaround: use a tweaked version of example/alt-centered-config.kdl

I needed to use the following setting instead:

    pane clear-defaults=true {
        bind "Enter" "Esc" "Space" { SwitchToMode "normal"; }
        bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; }
        bind "d" { NewPane "down"; SwitchToMode "normal"; }
        bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; }
        bind "h" "Left" { NewPane "Left"; }
        bind "l" "Right" { NewPane "Right"; }
        bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; }
        bind "j" "Down" { NewPane "Down"; }
        bind "k" "Up" { NewPane "Up"; }
        bind "Alt h" "Left" { MoveFocus "Left"; }
        bind "Alt l" "Right" { MoveFocus "Right"; }
        bind "Alt j" "Down" { MoveFocus "Down"; }
        bind "Alt k" "Up" { MoveFocus "Up"; }
        bind "p" { SwitchFocus; }
        bind "Ctrl p" { SwitchToMode "normal"; }
        bind "n" { NewPane; }
        bind "x" { CloseFocus; }
        bind "r" { NewPane "right"; SwitchToMode "normal"; }
        bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; }
        bind "z" { TogglePaneFrames; SwitchToMode "normal"; }
    }

There's no way to make "alt+p" work; thus I needed to change it to "ctrl+p". Not 100% satisfactory, but now I have a working configuration again.