zellij-org / zellij

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

Overriding keybinding does not work #3430

Closed kamilkloch closed 1 day ago

kamilkloch commented 2 weeks ago
kamilk@kamilk:~/.config/zellij$ head config.kdl
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds clear-defaults=true {

...
    shared_except "session" "locked" {
        bind "Ctrl i" { SwitchToMode "Session"; }
    }
...
}

Keybinding appears to be changed in zellij: Screenshot

But it does not work, and zellij setup --dump-config returns

    shared_except "session" "locked" {
        bind "Ctrl o" { SwitchToMode "Session"; }
    }
goosethedev commented 4 days ago

zellij setup --dump-config dumps the default configuration. What OS are you using? What's the output of zellij setup --check?

Maybe it is colliding with a keybind for your editor or terminal emulator?

kamilkloch commented 4 days ago

Ubuntu 24.

kamilk@kamilk:~/scripts$ zellij setup --check && echo Check OK
[Version]: "0.40.1"
[CONFIG DIR]: "/home/kamilk/.config/zellij"
[LOOKING FOR CONFIG FILE FROM]: "/home/kamilk/.config/zellij/config.kdl"
[CONFIG FILE]: Well defined.
[DATA DIR]: "/home/kamilk/.local/share/zellij"
[PLUGIN DIR]: "/home/kamilk/.local/share/zellij/plugins"
 Builtin, default plugins will not be loaded from disk.
 Create a custom layout if you require this behavior.
[LAYOUT DIR]: "/home/kamilk/.config/zellij/layouts"
[SYSTEM DATA DIR]: "/usr/share/zellij"
[ARROW SEPARATOR]: 
 Is the [ARROW_SEPARATOR] displayed correctly?
 If not you may want to either start zellij with a compatible mode: 'zellij options --simplified-ui true'
 Or check the font that is in use:
 https://zellij.dev/documentation/compatibility.html#the-status-bar-fonts-dont-render-correctly
[MOUSE INTERACTION]: 
 Can be temporarily disabled through pressing the [SHIFT] key.
 If that doesn't fix any issues consider to disable the mouse handling of zellij: 'zellij options --disable-mouse-mode'
[DEFAULT EDITOR]: mcedit
[FEATURES]: []
[DOCUMENTATION]: zellij.dev/documentation
Check OK
goosethedev commented 4 days ago

I tried it and yes, Ctrl + i seems to be overridden by the HORIZONTAL TABULATION ASCII signal (9). It does work with other Ctrl keybinds. Don't know if it's a problem of Zellij though...

kamilkloch commented 1 day ago

Thank you for the hint, I remapped to Ctrl-U and it works fine! (The reason for remapping Ctrl-O is Midnight Commander - Ctrl-O shows/hides terminal underneath).