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

Modifier-only triggers #4335

Open
mitchellh opened this issue Jan 1, 2025 · 1 comment
Open

Modifier-only triggers #4335

mitchellh opened this issue Jan 1, 2025 · 1 comment
Labels
input Keyboard or mouse input

Comments

@mitchellh
Copy link
Contributor

There are multiple discussions where this would be an appropriate solution: #3734, #3775

We should allow modifier-only triggers, i.e.:

ctrl = text:hello
shift+ctrl = text:goodbye
ctrl>ctrl = toggle_quick_terminal

This is a tricky issue to do well. Currently, our keybindings process on key press. This is normal for any application out there. But modifiers make this unsafe because if you press ctrl+a for example then we'll get a ctrl followed by a. For this reason, I think modifier triggers should trigger on release. (and we should document this)

I think for multiple modifiers like shift+ctrl this will require some more complex accounting in our Surface too.

While doing this, we should look into sided modifier only triggers too, i.e.:

right_alt = text:hello

This issue doesn't need to enable sided modifiers i.e. right_alt+a. That's going to require separate work.

@mitchellh mitchellh added the input Keyboard or mouse input label Jan 1, 2025
@Rotonen
Copy link

Rotonen commented Jan 3, 2025

For the downstream work on splitting sided modifiers: typically one can make only the left alt do "meta sends esc" for compatibility with decades of muscle memory for irssi and various other more interactive console apps.

See: #967 (comment)

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

No branches or pull requests

2 participants