Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

MacKeyServer EACCES #36

Description

@tisonkun
const { GlobalKeyboardListener } = require('node-global-key-listener')
const v = new GlobalKeyboardListener()

v.addListener(function (e, down) {
    if (e.state === 'DOWN') {
      let metaKey = Object.entries(down)
        .filter(([key, value]) => value === true && key.length > 1 && !/LOCK/.test(key))
        .map(([key, value]) => key);
  
      if (e.name.length === 1) metaKey.push(e.name);
      metaKey = metaKey.join('+');
      console.log(`${metaKey}`);
    }
  })

prints

node:events:497
      throw er; // Unhandled 'error' event
      ^

Error: spawn /Users/tison/Brittani/greptime-demo-scene/keyboard-monitor/node_modules/.pnpm/node-global-key-listener@0.2.0/node_modules/node-global-key-listener/bin/MacKeyServer EACCES
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -13,
  code: 'EACCES',
  syscall: 'spawn /Users/tison/Brittani/greptime-demo-scene/keyboard-monitor/node_modules/.pnpm/node-global-key-listener@0.2.0/node_modules/node-global-key-listener/bin/MacKeyServer',
  path: '/Users/tison/Brittani/greptime-demo-scene/keyboard-monitor/node_modules/.pnpm/node-global-key-listener@0.2.0/node_modules/node-global-key-listener/bin/MacKeyServer',
  spawnargs: []
}

Node.js v21.6.1

Mac Ventura 13.4:

Darwin tisondeMacBook-Pro.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:19 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6020 arm64

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions