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

Change keyEquivalent to show the typed character, not the QWERTY key cap label #72

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

Conversation

DivineDominion
Copy link
Contributor

Magnet does a great job translating the character of the pressed key into a key code and a "physical" key label. This PR changes property names to avoid confusion:

  • Renames the label of a KeyCombo that corresponds to a QWERTY keyboard key to qwertyKeyLabel
  • Changed keyEquivalent to produce a String that corresponds to the actual text character that results from pressing the key, which is needed for NSMenuItem and similar Cocoa/AppKit functionality

For users of Magnet that use KeyCombo for menu item shortcuts (like me), this means that the NSMenuItem.keyEquivalent needs to be updated when the keyboard layout is changed by the user, e.g. from QWERTY to DVORAK. This PR helps by aligning the meaning of "keyEquivalent" for this.

@DivineDominion
Copy link
Contributor Author

Updated for the latest changes to Sauce etc.

@Econa77 I'm not 100% certain I caught your intention with this PR. And maybe my description is confusing. Would be happy to discuss alternatives!

@DivineDominion
Copy link
Contributor Author

@Econa77 Just wanted to check if you want to move forward with this

@DivineDominion
Copy link
Contributor Author

@Econa77 Since you merged another PR recently, maybe you could look into this?

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