Bug 218055

Summary: Support Keyboard Map API
Product: WebKit Reporter: Justin Uberti <juberti>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ahmad.saleem792, dbates, ggaren, hi, smoley, webkit-bug-importer, wenson_hsieh, wilander
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac   
OS: Unspecified   

Description Justin Uberti 2020-10-21 14:52:54 PDT
This API allows applications to determine which keycodes are mapped to specific keyboard keys on non-QWERTY keyboard layouts. For example, in a FPS game, the player will navigate using the WASD keys on a QWERTY keyboard, but ",AOE" on a Dvorak keyboard.

Providing this information allows a web application to show an appropriate keyboard hint (e.g., "press the [,] key to move forward") for the current keyboard layout.

Spec: https://wicg.github.io/keyboard-map/.

There are fingerprinting considerations here, as noted in https://wicg.github.io/keyboard-map/#privacy. Given that the mapping between a key and its keycode is shared with the web application whenever a key is pressed (allowing fairly identification of layout with only a couple keys), requiring a user gesture may be sufficient protection.
Comment 1 Radar WebKit Bug Importer 2020-10-22 13:52:44 PDT
<rdar://problem/70587899>
Comment 2 Ahmad Saleem 2024-02-07 22:38:44 PST

*** This bug has been marked as a duplicate of bug 186680 ***