Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gessen opened this issue Sep 6, 2024 · 2 comments
Open

Comments

@gessen
Copy link

gessen commented Sep 6, 2024

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"

@tgulacsi
Copy link

tgulacsi commented Nov 5, 2024

What is the required/used/working protoc version?

I've tried to compile the current main (to test 80fcd0f), but can't compile it with protoc 3.11.3:

protoc failed: action.proto:62:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields
 in Proto3, simply remove the 'optional' label, as fields are 'optional' by default
...

Simply removing the "option" fields results in compilation errors (Optional instead of concrete type, like

error[E0308]: mismatched types                                                                                                                                                                           
  --> zellij-utils/src/plugin_api/resize.rs:31:24                                                                                                                                                        
   |                                                                                                                                                                                                     
31 |             direction: None,                                                                                                                                                                        
   |                        ^^^^ expected `i32`, found `Option<_>`                                                                                                                                       
   |                                                                                                                                                                                                     
   = note: expected type `i32`                                                                                                                                                                           
              found enum `std::option::Option<_>`                                                                                                                                                        

)

@tgulacsi
Copy link

tgulacsi commented Nov 6, 2024

#3592 (comment) : sorry for the noise - my protoc was outdated. With 3.25.4, it works as intended.

I can confirm that 80fcd0f (#3725) fixes this (#3592) error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@tgulacsi @gessen and others