Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Handle keyboardEvent.key being undefined on macOS #240

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

Conversation

rsese
Copy link

@rsese rsese commented Jun 14, 2019

Co-Authored-By: Linus Eriksson Ben3eeE@users.noreply.github.com

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

Co-Authored-By: Linus Eriksson <Ben3eeE@users.noreply.github.com>
@Ben3eeE
Copy link
Contributor

Ben3eeE commented Jun 14, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants