Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose keyboards and pointers to workers by adapting the WebHID API. #103

Open
7ombie opened this issue Dec 14, 2022 · 0 comments
Open

Expose keyboards and pointers to workers by adapting the WebHID API. #103

7ombie opened this issue Dec 14, 2022 · 0 comments

Comments

@7ombie
Copy link

7ombie commented Dec 14, 2022

The Input for Workers Proposal existed to expose keyboard, pointer and MIDI events to workers. The WebMIDI API is handling the MIDI part now, but the Input for Workers Proposal has been abandoned, so the Web now lacks any active proposal for accessing the keyboard, mouse, touchpad etc in workers.

I understand that this API will not generally expose keyboards or pointer devices for security reasons. However, (IIUC) this is only an issue because the API permits pages to access devices after the page loses focus.

Is there any way to safely extend the WebHID API to permit access to keyboards and pointers? For example, an option that permits more devices to be accessed, but only when the page has focus.

I don't understand the technicalities well enough to propose anything concrete, and I understand this would complicate the WebHID spec, but the Web really needs an API for accessing keyboard and pointer events globally (DOM-agnostically) that can be accessed in workers. It seemed worthwhile considering whether this spec could address that issue too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant