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

Add support for Ctrl and Alt modifiers on function keys in keybindings. #3179

Merged

Conversation

hovinen
Copy link
Contributor

@hovinen hovinen commented Mar 2, 2024

Previously, it was not possible to define keybindings with a modifier and a function key. The Key enum only supported combinging the Ctrl and Alt modifiers with letters. This is somewhat limiting: I would like to make the Zellij keybindings more "distant" than those used in the programs I use from within Zelilj, so that Zellij does not intefere with those programs. Thus I would like to move some of the keybindings from Ctrl+character to Ctrl+function key.

This change adds:

  • support for function keys with the Ctrl and Alt modifiers in the Key enum,
  • support for parsing such keybindings from the configuration file,
  • support for such keybindings in the protobuf which communicates the keybindings to plugins, and
  • support for these keybindings in the plugin API.

This is tested by modifying one of the e2e tests to include an example of such keybindings. This verifies that the configuration is correctly parsed, communicated with the plugin, and rendered.

Previously, it was not possible to define keybindings with a modifier
and a function key. The `Key` enum only supported combinging the Ctrl
and Alt modifiers with letters. This is somewhat limiting: I would like
to make the Zellij keybindings more "distant" than those used in the
programs I use from within Zelilj, so that Zellij does not intefere with
those programs. Thus I would like to move some of the keybindings from
Ctrl+<character> to Ctrl+<function key>.

This change adds:

  * support for function keys with the Ctrl and Alt modifiers in the
    `Key` enum,
  * support for parsing such keybindings from the configuration file,
  * support for such keybindings in the protobuf which communicates the
    keybindings to plugins, and
  * support for these keybindings in the plugin API.

This is tested by modifying one of the e2e tests to include an example
of such keybindings. This verifies that the configuration is correctly
parsed, communicated with the plugin, and rendered.
@imsnif
Copy link
Member

imsnif commented Mar 25, 2024

Great work! Thank you for this.

@imsnif imsnif merged commit 312817f into zellij-org:main Mar 25, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants