zellij icon indicating copy to clipboard operation
zellij copied to clipboard

Invalid key: 'Alt Enter' when trying to bind Alt Enter

Open Iduoad opened this issue 2 years ago • 9 comments

I am trying to bind Alt Enter

bind "Alt Enter" { NewPane; SwitchToMode "Normal"; }
bind "Alt Tab" { NewTab; SwitchToMode "Normal"; }

And I am getting an error:

5 │         bind "Alt Enter" { NewPane; SwitchToMode "Normal"; }
   ·         ──────────────────────────┬─────────────────────────
   ·                                   ╰── Invalid key: 'Alt Enter'

Link of the Discussion #2477

Iduoad avatar May 24 '23 23:05 Iduoad

I think #735 is an issue rooted in the same reason this isn't possible.

BTW: If you open a discussion and an Issue, it's good form to link them both. All you need is to mention the number in each: #2477

Lockszmith-GH avatar May 24 '23 23:05 Lockszmith-GH

Thank you for the answer. I see #735 is about binding 2 modifiers + a character. Is Enter and Tab considered modifiers too?

I am able to bind Alt+Enter and Alt+Tab in Tmux, but not in Zellij.

Iduoad avatar May 25 '23 00:05 Iduoad

Now I'm interested as well :) If it works in tmux, then there is probably a way for Zellij to support it. (BTW, I linked the other issue, because it refers to the way key-capture works and it's limitations - I know the title is about a different issue)

Keeping an eye here with you, hopefully one of the maintainers will catch a glimps.

Lockszmith-GH avatar May 25 '23 11:05 Lockszmith-GH

I have a similar issue trying to change a binding:

× Failed to parse Zellij configuration
     ╭─[.config/zellij/config.kdl:181:1]
 181 │     shared_except "tmux" "locked" {
 182 │         bind "Ctrl Space" { SwitchToMode "Tmux"; }
     ·         ─────────────────────┬────────────────────
     ·                              ╰── Invalid key: 'Ctrl Space'
 183 │     }
     ╰────
  help: For more information, please see our configuration guide: https://
        zellij.dev/documentation/configuration.html

This binding has worked fine for me in tmux.

bonsairobo avatar Sep 14 '23 20:09 bonsairobo

I would absolutely love to bind Alt Enter to NewPane :( and Alt Tab to ToggleFloatingPanes...

oredaze avatar Dec 30 '23 19:12 oredaze

Similar problem with:

bind "Ctrl Tab" { GoToNextTab; }
    ·                 ────────────────┬───────────────
    ·                                 ╰── Invalid key: 'Ctrl Tab'
    

rousbound avatar Mar 14 '24 18:03 rousbound