Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Keyboard event lookup fails for Escape key #1072

Closed
drstonebraker opened this issue May 6, 2020 · 3 comments
Closed

Keyboard event lookup fails for Escape key #1072

drstonebraker opened this issue May 6, 2020 · 3 comments
Labels
sunset Issues/PRs auto-closed when repo was archived

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

@shicks shicks added the sunset Issues/PRs auto-closed when repo was archived label Aug 1, 2024
@shicks
Copy link
Member

shicks commented Aug 1, 2024

This issue is being closed as a preparation step before archiving the repository. See the README for more detail.

@shicks shicks closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
sunset Issues/PRs auto-closed when repo was archived
Projects
None yet
Development

No branches or pull requests

2 participants