Open Bug 1469017 Opened 6 years ago Updated 1 year ago

[Feature Request] Add support for Keyboard Map API

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: garykac, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-needed)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36

Steps to reproduce:

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
Component: Untriaged → Event Handling
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
Gary, can you open a request for a Mozilla position on your proposal?

https://github.com/mozilla/standards-positions/issues/

Thanks!
Flags: needinfo?(garykac)
Priority: -- → P3
Component: Event Handling → User events and focus handling
Type: defect → enhancement

Just curious: is this still an active project? Our team at SketchUp is working on a shortcut customization implementation, relying heavily on the Chrome/Edge implementation. Obviously, we'd love to offer top-notch support in Firefox.

Masayuki, what do you think of the API?

The API does clearly have some privacy concerns.

Flags: needinfo?(masayuki)

Yes, it is. And we often get bugs reports from customized or really minor keyboard layout users. For such users, exposing this information is really strong fingerpintting source. Finally, Apple has already refused. So, I think that we do not need to this API.

On the other hand, this API might be useful for our UI. So, as a chrome only API, this could be useful. If we implement this API as chrome only API, and, too many web apps require this API (and banned other browsers than Chrome), just open it for web apps might be the best way for web-compat. (Anyway there are some strong fringerprinting source for minor environment users, e.g., screen resolution, so that I think that demand of this API is also important for the consideration. But currently, I believe that web apps requiring this API are only a few.)

Flags: needinfo?(masayuki)

Thanks for the consideration and input. I'll keep my eye on this thread. We'll move forward with limited support for Firefox with respect to this capability. I'll post here again when there is a version of our app that demonstrates how we are using the keyboard map API.

Severity: normal → S3

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.

For more information, please visit auto_nag documentation.

Flags: needinfo?(garykac)
You need to log in before you can comment on or make changes to this bug.