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 tracking modifierFlags on key events #138

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

eugenesvk
Copy link

Allowing checking for left/right modifier key presses

Also adds a display impl to print those keys with nice ⇧⌥⌘ symbols and side indicators like

  • ‹⇧ left shift and
  • ⇧› right shift
  • ‹⇧› left+right shift

I'd replace the current EventModifierFlag enum with this bitflagy implementation, but then not sure what that one is used for, so left it as is and created a new enum

Also not sure why EventModifierFlag was duplicated in the appkit and events, couldn't it just be in 1 place in events and then Appkit would use that?

Anyway, for for now I've only added this to the Appkit as these are appkit apis

to track which modifier keys are currently pressed with the ability to differentiate left vs. right
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.

1 participant