wilix-team / iohook

Node.js global keyboard and mouse listener.
https://wilix-team.github.io/iohook
MIT License
1.18k stars 291 forks source link

App quite after pressing volume keys on macOS Catalina #297

Open pisces-hui opened 3 years ago

pisces-hui commented 3 years ago

Expected Behavior

Press volume keys without quit.

Current Behavior

After press volume keys, the entire app would quit immediately.

Just like command + Q.

Possible Solution

N/A

Steps to Reproduce (for bugs)

  1. git clone electron and yarn
  2. yarn add iohook
  3. start
  4. Press key volume up
  5. Quit

Context

/Users/pisces/workspace/demos/elet/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron exited with signal SIGILL
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Your Environment

"dependencies": {
    "iohook": "^0.7.2",
     "electron": "^11.3.0",
  },
  "iohook": {
    "targets": [
      "node-83",
      "electron-85"
    ],
    "platforms": [
      "win32",
      "darwin"
    ],
    "arches": [
      "x64",
      "ia32"
    ]
  }

node.js v14.15.5 macos Catalina v10.15.6

amitojsingh366 commented 3 years ago

Having the same issue on bigSur, not only on volume keys but all the media keys

anis-dr commented 3 years ago

Having the same issue with big sur

ppenelon commented 3 years ago

Same issue on Big sur, also for all the media keys Electron exited with signal SIGILL

ash0x0 commented 3 years ago

Can anyone provide a stacktrace?

marcelblum commented 3 years ago

Further to what @ash0x0 asked, can you provide pics of the keyboard you are seeing this on and details on keyboard model? (Is it Apple official? 3rd party? Built into Macbook?). Unable to repro here on several Apple & generic/3rd party keyboards that I've tested on. Some media keys get trapped by iohook and others seemingly ignored, but no crashes here.

DCzajkowski commented 2 years ago

I crashes for me when using touch bar media controls (volume, play/pause). However, this happens only when running the app through a terminal with electron app.js. When the app is built using electron-builder I've experienced it once or twice, but cannot reproduce every time.

Environment: