You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
var usagePage = 0xFF60; //usagePage for planck. dumped from HID.devices()
var usage = 0x61; //usage for planck. dumped from HID.devices();
var devices = HID.devices(); //get all HID devices instead of connecting directly with PID and VID as some devices will have multiple HID "channels(?)"
var deviceInfo = devices.find( function(d) {
var isPlanck = d.vendorId===vid && d.productId===pid; //make sure eveyrthing matches
return isPlanck && d.usagePage===usagePage && d.usage===usage; //including usage. without matching usage, i could not read or write.
});
if( deviceInfo ) {
var device = new HID.HID( deviceInfo.path ); //create new device with matched information
keyboard = device; //assign global "keyboard" variable to newly created keyboard object.