uiohook-napi icon indicating copy to clipboard operation
uiohook-napi copied to clipboard

Macos 14.1 (23B74) don't work

Open I-Want-ToBelieve opened this issue 2 years ago • 2 comments

a.mjs

import { uIOhook, UiohookKey } from 'uiohook-napi'
console.log('1')
uIOhook.on('keydown', (e) => {
  if (e.keycode === UiohookKey.Q) {
    console.log('Hello!')
  }

  if (e.keycode === UiohookKey.Escape) {
    process.exit(0)
  }
})

uIOhook.on('mousedown', (evt) => {
  console.log('mousedown')
  if (evt.button) {
    console.log('mousedown', evt.button)
  }
})

uIOhook.on('mouseup', (evt) => {
  console.log('mouseup')
  if (evt.button) {
    console.log('mouseup', evt.button)
  }
})

uIOhook.start()
console.log('2')
❯ node -v
v18.18.2
❯ node a.mjs
1
2

There is no output either by pressing the mouse button or by the keyboard

image

I-Want-ToBelieve avatar Nov 17 '23 22:11 I-Want-ToBelieve

On macOs 14.0 don't work too

donebd avatar Nov 19 '23 19:11 donebd

As far as I can tell (compiling and running the async demo locally on macOS 14.4 arm64), this particular fork of libuiohook does work. I've taken a stab at integrating it here, but my C/C++ skills are uh...very lacking. Anyone want to integrate it?

mhgbrown avatar Mar 14 '24 11:03 mhgbrown