Shift-Tab is "Unidentified" #13

Closed
opened 2022-07-24 08:54:54 +02:00 by FPurchess · 2 comments
FPurchess commented 2022-07-24 08:54:54 +02:00 (Migrated from github.com)

Binding Shift-Tab in prosemirror-keymap results in an unexpected behaviour originally cased by this package. Though the KeyboardEvent is clearly recognized as Tab with a shift-modifier (event.keyCode === 9 && event.shiftKey), the key is marked as "Unidentified".

Here's the user agent (using prosemirror in https://github.com/tauri-apps/tauri):
Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15

However, I can confirm that the Tab gets detected in Firefox & Chrome thought.

Binding `Shift-Tab` in prosemirror-keymap results in an unexpected behaviour originally cased by this package. Though the `KeyboardEvent` is clearly recognized as Tab with a shift-modifier (`event.keyCode === 9 && event.shiftKey`), the key is marked as `"Unidentified"`. Here's the user agent (using prosemirror in https://github.com/tauri-apps/tauri): `Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15` However, I can confirm that the Tab gets detected in Firefox & Chrome thought.
marijnh commented 2022-07-24 10:55:17 +02:00 (Migrated from github.com)

Funny, seems that mess of a browser sets event.key to "Unidentified" when shift is held for some reason. Attached patch allows keyName to ignore the key property in that case.

Funny, seems that mess of a browser sets `event.key` to `"Unidentified"` when shift is held for some reason. Attached patch allows `keyName` to ignore the `key` property in that case.
FPurchess commented 2022-07-24 12:46:19 +02:00 (Migrated from github.com)

Thank @marijnh ❤️ much appreciated!

Thank @marijnh ❤️ much appreciated!
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marijn/w3c-keyname#13
No description provided.