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

Missing "Insert" and "Delete" keys from the Event Key Location table #347

Open
denilsonsa opened this issue May 26, 2023 · 2 comments · May be fixed by #348
Open

Missing "Insert" and "Delete" keys from the Event Key Location table #347

denilsonsa opened this issue May 26, 2023 · 2 comments · May be fixed by #348

Comments

@denilsonsa
Copy link

The 5.6.2. Keyboard Event Key Location section (source) has a table of several keys that have different locations, and a list of all the possible (and known) values for .location for such keys. It also says:

For all other keys not listed in this table, the location attribute MUST always be set to DOM_KEY_LOCATION_STANDARD.

However, the Insert and Delete keys are missing from that table. Those keys are traditionally together with Home/End and Page Up/Down; and they are also available as Numpad0 and NumpadDecimal.

Additionally, both Firefox and Chrome (on Linux) report Insert and Delete with .location = 3 (DOM_KEY_LOCATION_NUMPAD), deviating from the current draft. Thus, I believe the lack of those keys in the UI Events spec was a mistake. (I have not tested on any other system.)

You can test the behavior yourself by disabling NumLock and trying those keys on either https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html or https://codepen.io/denilsonsa/pen/epmoma

@denilsonsa denilsonsa linked a pull request May 26, 2023 that will close this issue
5 tasks
@denilsonsa
Copy link
Author

Upon further inspection of uievents-code spec, there are more numpad keys, such as ,, = and Clear. (Although the note says Clear should be encoded as NumLock.) I believe those keys are also missing from the 5.6.2 section, and they should probably return DOM_KEY_LOCATION_NUMPAD. I'm not sure what is the current behavior, as I have access to neither Mac nor Brazil-ABNT keyboard nowadays.

@jrandolf-2
Copy link
Contributor

Clear is not specified because it depends on the OS. On macOS it's NumLock, but everywhere else it's NumLockClear

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

Successfully merging a pull request may close this issue.

2 participants