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

keyEquivalent String should not produce the physical key of a QWERTY keyboard #70

Open
DivineDominion opened this issue Apr 6, 2021 · 1 comment

Comments

@DivineDominion
Copy link
Contributor

DivineDominion commented Apr 6, 2021

KeyHolder uses Magnet's KeyCombo.keyEquivalent to show which key the user has pressed.

Take the C key, for example; the key cap of that key has "C" printed on a QWERTY keyboard. But when you switch keyboard layouts to DVORAK or NEO2 or similar, the actual typed character is different. Magnet's current logic is independent of the on-screen character and always shows the physical key.

For the NEO2 layout, the C key produces an "ä" character, for example:

image
image

Users have reported this to be confusing, because they want to see the character, not the key of their keyboard in the KeyHolder RecordView.

It gets confusing when you use Magnet and Sauce to record local keyboard shortcuts and show them in NSMenuItems like I do, because the NSMenuItem.keyEquivalent expects the "ä" character while the record view shows the "C" key. In general terms, the NSMenuItem's meaning of a 'key equivalent' is the actual typed character, not the physical key. So there's a mismatch.

I think the keyEquivalent property should be renamed, e.g. to keyLabel or keyCap.

@DivineDominion
Copy link
Contributor Author

I proposed a change in #72 to introduce a keyEquivalent that matches what NSMenuItem and other shortcut-enabled Cocoa controls would expect.

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

No branches or pull requests

1 participant