Private thePrivate keymapPrivate _mousePrivate _kbdPrivate boundPrivate boundPrivate boundPrivate boundPrivate boundPrivate boundStatic initInitialize HID functionality in your WebChucK instance.
This adds a Hid and HidMsg class to the ChucK Virtual Machine (VM).
Mouse and keyboard event listeners are added if enableMouse and enableKeyboard are true (default).
WebChucK instance
boolean to enable mouse HID
boolean to enable keyboard HID
theChuck = await Chuck.init([]);
hid = await HID.init(theChuck); // Initialize HID with mouse and keyboard
theChuck = await Chuck.init([]);
hid = await HID.init(theChuck, false, true); // Initialize HID, no mouse, only keyboard
HID (Human Interface Device) support for WebChucK. HID wraps JavaScript mouse/keyboard event listeners enabling mouse and keyboard input via the HID class in ChucK.
To get started with HID:
Example