atom-keymap icon indicating copy to clipboard operation
atom-keymap copied to clipboard

Handle keyboardEvent.key being undefined on macOS

Open rsese opened this issue 6 years ago • 1 comments

Co-Authored-By: Linus Eriksson [email protected]

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

User has custom keymap where some keys are undefined:

https://discuss.atom.io/t/using-keyboard-layout-package/65697

This change makes it so on macOS, if this is the case, we use keyboard-layout to resolve the key.

If the key is undefined, it probably makes sense to fallback to keyboard-layout (we currently get undefined in Atom).

Alternate Designs

We could file an issue in Chrome and they could fix there.

Benefits

Resolve undefined keystrokes in a more correct way instead of [modifier]-undefined. This is the best guess we have.

Possible Drawbacks

User might have bound something to alt-undefined but extremely unlikely.

Applicable Issues

https://discuss.atom.io/t/using-keyboard-layout-package/65697

rsese avatar Jun 14 '19 22:06 rsese

I wonder if we should make this change apply to all platforms?

Ben3eeE avatar Jun 14 '19 22:06 Ben3eeE