Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macos 14.1 (23B74) don't work #36

Open
I-Want-ToBelieve opened this issue Nov 17, 2023 · 2 comments
Open

Macos 14.1 (23B74) don't work #36

I-Want-ToBelieve opened this issue Nov 17, 2023 · 2 comments

Comments

@I-Want-ToBelieve
Copy link

I-Want-ToBelieve commented Nov 17, 2023

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

@donebd
Copy link

donebd commented Nov 19, 2023

On macOs 14.0 don't work too

@mhgbrown
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants