How to use the iohook.registerShortcut function in iohook

To help you get started, we’ve selected a few iohook 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 klayveR / xenontrade / src / index.js View on Github external
initializeHotkeys() {
    var self = this;

    // Register CTRL + C hotkey
    const clipboardShortcut = ioHook.registerShortcut([29, 46], (keys) => {
      if(config.get("pricecheck") && this.poeFocused) {
        // Waiting 100ms before calling the processing method, because the clipboard needs some time to be updated
        var timeout = setTimeout(function() {
          Pricecheck.getPrice(clipboardy.readSync());
        }, 100);
      }
    });

    ioHook.start();
  }

iohook

Node.js global keyboard and mouse hook

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis