Consider extending uBlock Privacy with keyboard-map permission policy #20159
Replies: 4 comments 3 replies
-
See: WICG/keyboard-map#38
|
Beta Was this translation helpful? Give feedback.
-
I was playing with this PR and I believe Chromium currently has a bug which prevents Permissions Policy from working. In particular, I see that
|
Beta Was this translation helpful? Give feedback.
-
Yes, keyboard shortcuts for different layouts is the primary use case for this API. All modern browsers support KeyboardEvent/code which is an explicit successor to |
Beta Was this translation helpful? Give feedback.
-
cc @maymen1 |
Beta Was this translation helpful? Give feedback.
-
Prerequisites
I tried to reproduce the issue when...
Description
ublock-privacy list already has directives for a few privacy-hostile permissions. I propose adding
keyboard-map
directive.This directive controls Keyboard Map API (specification) which specifies
navigator.keyboard.getLayoutMap()
method (MDN docs). This API exposes a significant amount of fingerprintable data for users of non-standard keyboard layouts or users with unusual keyboards, while not informing the user about its usage. This API has very little practical utility, it can be mostly used just for shortcut management in web productivity programs (think user who uses Dvorak layout pressing Ctrl+Z shortcut but program actually receiving something like Ctrl+Q) and browser video games (like user trying to use AWSD keys for walking but program receiving A,OE keys). These use cases are rater rear/weak and are solved much better via website-specific custom settings UI which offers user to select an action and then press the desired key combination to assign it). Both Mozilla and Apple opposed this feature on these grounds and declined implementing it.Mozilla position:
Apple position:
Brave disables Keyboard Map API (sets
navigator.keyboard
tonull
) when their "Brave Shields" are enabled since 2021 (source).Example reproduction:
https://example.com
For standard English keyboard:
URL(s) where the issue occurs.
https://example.com
Screenshot(s)
No response
uBO version
1.52.2
Browser name and version
Chromium 118.0.5993.70
Settings
Notes
No response
Beta Was this translation helpful? Give feedback.
All reactions