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

Fix keyboard shortcuts in editor and media viewer #726

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Dec 31, 2023

Fixed modifier checks not to be affected by NumLock (and other private GDK constants). Fixed MediaViewer and Composer to accept NumPad keys along with alphanumeric block keys.

Fixes #725

Filter the Gdk.ModifierState value to exclude internal values when
matching them against expected modifier state.  This is necessary to
make the key shortcuts work when Num Lock is on.  Per GDK documentation:

```
 * Note that GDK may add internal values to events which include values outside
 * of this enumeration. Your code should preserve and ignore them.  You can use
 * %GDK_MODIFIER_MASK to remove all private values.
```
Add NumPad + (KP_Add) and - (KP_Subtract) keys to accepted keys for
zoom in/out shortcuts, for better consistency and usability.
@GeopJr
Copy link
Owner

GeopJr commented Jan 4, 2024

LGTM, thanks!

@GeopJr GeopJr merged commit a2774a5 into GeopJr:main Jan 4, 2024
5 checks passed
@mgorny mgorny deleted the keymods-fix branch January 4, 2024 18:43
@mgorny
Copy link
Contributor Author

mgorny commented Jan 4, 2024

Thanks!

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.

[Bug]: zoom keys work only from alphanumeric block, and only with NumLock off
2 participants