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

Keyboard event lookup fails for Escape key #1072

Open
drstonebraker opened this issue May 6, 2020 · 2 comments
Open

Keyboard event lookup fails for Escape key #1072

drstonebraker opened this issue May 6, 2020 · 2 comments

Comments

@drstonebraker
Copy link

drstonebraker commented May 6, 2020

When registering a shortcut with goog.ui.KeyboardShortcutHandler for the escape key with a key name, one must use 'esc' instead of 'escape', since the goog.events.KeyNames does not have 'escape'. However, the real key name used by most modern browsers (exception being IE and Edge) for the escape key is "Escape" (per spec). So when a shortcut is registered and the escape key is pressed in a newer browser, the lookup for a registered key named "Escape" fails, and it instead falls back to using the keyCode.

This is a problem since keyCode is deprecated and some testing libraries expect to be able to create KeyboardEvent objects using the spec'ed name for this key: 'Escape'

@shicks
Copy link
Member

shicks commented Jun 2, 2020

Do you see a reasonable way to support both? What do you propose to fix this?

@drstonebraker
Copy link
Author

Unfortunately I don't

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

2 participants