UNPKG

xkeys-webhid

Version:

An npm module for interfacing with the X-keys panels in a browser

20 lines 942 B
/// <reference types="w3c-web-hid" /> import { GenericXKeysWatcher, XKeys, XKeysWatcherOptions } from '@xkeys-lib/core'; /** * Set up a watcher for newly connected X-keys panels. * Note: It is highly recommended to set up a listener for the disconnected event on the X-keys panel, to clean up after a disconnected device. */ export declare class XKeysWatcher extends GenericXKeysWatcher<HIDDevice> { private eventListeners; private pollingInterval; constructor(options?: XKeysWatcherOptions); /** * Stop the watcher * @param closeAllDevices Set to false in order to NOT close all devices. Use this if you only want to stop the watching. Defaults to true */ stop(closeAllDevices?: boolean): Promise<void>; protected getConnectedDevices(): Promise<Set<HIDDevice>>; protected setupXkeysPanel(device: HIDDevice): Promise<XKeys>; private handleConnectEvent; } //# sourceMappingURL=watcher.d.ts.map