How to use the usb-detection.stopMonitoring function in usb-detection

To help you get started, we’ve selected a few usb-detection examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github diefarbe / node-rest-api / src / modules / keyboard.ts View on Github external
public deinit() {
        this.keyboardEvents.removeSettingsListener(this.onSettingsChanged);
        this.keyboardEvents.removeStateChangeListener(this.onStateChangeRequested);

        // stop the redrawTimer
        if (this.redrawTimer != null) {
            clearTimeout(this.redrawTimer);
            this.redrawTimer = null;
        }

        // restore the default rainbow pattern
        this.restoreHardwareProfile();

        // stop monitoring the usbs
        usbDetect.stopMonitoring();

        // disconnect from any current keyboard
        this.disconnectKeyboard();
    }
github FrogTheFrog / steam-gyro-for-cemuhook / src / lib / steam-device.ts View on Github external
static stopMonitoring() {
            if (this.motoringCallCount-- > 0 && this.motoringCallCount === 0) {
                usbDetect.stopMonitoring();
            }
        }
github FrogTheFrog / steam-gyro-for-cemuhook / src / backend / lib / steam-device / steam-hid-device.ts View on Github external
public static stopMonitoring() {
        if (--this.motoringCallCount === 0) {
            usbDetect.stopMonitoring();
        }
    }

usb-detection

Listen to USB devices and detect changes on them.

MIT
Latest version published 1 year ago

Package Health Score

51 / 100
Full package analysis