Re: [w3c/gamepad] Request: support for analog keyboards (Issue #187)

Exposing keyboard inputs through Gamepad API would put the user at risk. Currently, Gamepad API doesn't enforce any input focus restrictions. A page can receive gamepad inputs even if it's not focused or backgrounded. We think this is fine because gamepads aren't commonly used to enter private information like passwords, and there are known use cases where background gamepad access is desirable.

Keyboards, on the other hand, are commonly used to enter private information like passwords. The operating system uses an input focus model to give the user control over which applications receive keystroke data. A similar focus model is implemented on the web platform to prevent a page from receiving key events meant for a different page, or to prevent a page from capturing keystrokes entered into a protected field.

If we expose pressure-sensitive keyboard inputs through Gamepad API, it gives script access to keystroke data that it would not be able to receive as input events, undermining the browser's input focus model. I don't see a way around this so I think this is probably a non-starter.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/issues/187#issuecomment-1622601272
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/issues/187/1622601272@github.com>

Received on Wednesday, 5 July 2023 22:15:41 UTC