P.I. Engineering X-keys SDK Documentation | Main Page
WebHID Sample
The WebHID API allows web applications to communicate with and control Human Interface Devices (HIDs) like X-keys. The API enables websites to interact with a wide range of devices beyond standard inputs like keyboards, mice, and gamepads, by providing a way to request access, send and receive reports, and retrieve device information. The WebHID API was developed through the efforts of the Web Platform Incubator Community Group under the W3C Community Contributor License Agreement. The editor for the specification is Matt Reynolds (Google). The specification is based on the principles of user control, transparency, and ergonomics. Documentation for WebHID can be found at https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API
Not all browsers support WebHID. Google Chrome, Microsoft Edge, and Opera are known browsers that support the WebHID API.
The sample can be found in the PI Engineering SDK\WebHID Sample folder. It is an .html page with javascript. Simply plug in an X-keys and open the .html file in a supported browser. The sample demonstrates how to connect to the X-keys, how to read data from it, and how to write data to it.