zellij-org / zellij

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

Keybinds don't work when both NumLock and kitty protocol are turned on #3592

Open gessen opened 1 month ago

gessen commented 1 month ago

2. Issues with the Zellij UI / behavior / crash

Issue description

When the Kitty keyboard protocol is enabled and NumLock is active, keybindings will not function as expected. This issue likely arises from the correct parsing of keyboard input with the NumLock modifier, followed by attempts to match keybindings that do not include this modifier. The relevant code can be found https://github.com/zellij-org/zellij/blob/main/zellij-utils/src/input/keybinds.rs#L46. It may be beneficial for Zellij to exclude the NumLock modifier when matching keybindings with keyboard input.

Minimal reproduction

Enable Kitty keyboard protocol (default option), turn on NumLock, try any keybind like Ctrl-P. Turn off NumLock and keybinds works as expected.

Other relevant information

The first time you launch and a wizard comes up, with NumLock turned on, it will panic with Failed to convert to protobuf: "unsupported key modifier"