The Keyboard Map API (`navigator.keyboard.getLayoutMap()`) returns a map which translates from `KeyboardEvent.code` values into a strings that can be shown to the user to identify each key. This is not possible with existing web platform APIs because the value that should be shown to the user depends on the keyboard layouts that the user has installed and active. WICG incubation spec: https://wicg.github.io/keyboard-map/ Explainer: https://github.com/WICG/keyboard-map/blob/master/explainer.md
For reference, tracking issues in other browsers: * ChromeStatus: https://www.chromestatus.com/features/6730004075380736 * Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=832811 * Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1469017 * Edge: https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/34574317-support-navigator-keyboard-getlayoutmap-api
https://github.com/mozilla/standards-positions/issues/300 > Only supported by Chromium as of right now. Web-Spec Link (WICG): https://wicg.github.io/keyboard-map/ We don't have any WebKit position for this, should we create an entry here: https://github.com/WebKit/standards-positions/issues
WPT Test Coverage - https://wpt.fyi/results/keyboard-map?label=master&label=experimental&aligned&q=keyboard-map
I'm pretty certain we're against this API due to privacy & fingerprinting concerns. See https://github.com/WICG/keyboard-map/issues/30
(In reply to Ryosuke Niwa from comment #4) > I'm pretty certain we're against this API due to privacy & fingerprinting > concerns. See https://github.com/WICG/keyboard-map/issues/30 Thanks! I just wanted to tidy-up all UI Events related bugs, so I thought to comment and get input. :-)
*** Bug 218055 has been marked as a duplicate of this bug. ***