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

Simplify/restrict shortcut mods #4741

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Simplify/restrict shortcut mods #4741

wants to merge 4 commits into from

Conversation

rom1v
Copy link
Collaborator

@rom1v rom1v commented Mar 7, 2024

Restrict shortcut modifiers to be composed of only one item each.

Currently, it is possible to select a list of multiple combinations of modifier keys, like --shortcut-mod='lctrl+lalt,rctrl+rsuper', meaning that shortcuts would be triggered either by LCtrl+LAlt+key or RCtrl+RSuper+key.

This was overly generic, probably not used very much, and it prevents to solve easily inconsistencies between UP and DOWN events of modifier keys sent to the device.

For example, if --shortcut-mod='lctrl+lalt', and the user successively performs the following actions:

  • press LAlt
  • press LCtrl → do not send LCtrl DOWN event (because LAlt+LCtrl is a shortcut modifier)
  • release LAlt
  • release LCtrl → send LCtrl UP event (because there is no shortcut modifier enabled)

So an UP event is generated while no DOWN event is generated, which is inconsistent.

The problem is resolved with shortcuts modifiers of only 1 item (ignore the associated keycodes).

(EDIT: not all issues are solved though, it is still possible to generate a key down without the matching key up or vice-versa)

Refs #4732

Legitimate or not, we should not use sources that do not match the
repository.

Refs <libusb/libusb#1468 (comment)>
Refs <https://news.ycombinator.com/item?id=39866309>
Refs #4713 <#4713>
Pause/unpause display on MOD+z and MOD+Shift+z.

It only impacts rendering, the device is still captured, the video
stream continues to be transmitted to the device and recorded (if
recording is enabled).

Fixes #1632 <#1632>
PR #4748 <#4748>
Restrict shortcut modifiers to be composed of only one item each.

Before, it was possible to select a list of multiple combinations of
modifier keys, like --shortcut-mod='lctrl+lalt,rctrl+rsuper', meaning
that shortcuts would be triggered either by LCtrl+LAlt+key or
RCtrl+RSuper+key.

This was overly generic, probably not used very much, and it prevents to
solve inconsistencies between UP and DOWN events of modifier keys sent
to the device.

Refs #4732 <#4732>
Never inject keycodes used as shortcut modifiers.

Refs #4732 <#4732>
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

1 participant