nut-tree/libnut-core

NumLock throwing error

Closed this issue · 3 comments

Creating a new issue - not sure if my comment the in the closed issue referenced below was seen.

          There seems to be a mismatch somewhere with NumLock - when I use Key.NumLock I get an error:
Error: [nut.js] - Error: Invalid key code specified.
    at Object.libnut. [as keyToggle] (/Users/ksmith/dev/nutjs-test/node_modules/@nut-tree/libnut-darwin/permissionCheck.js:68:96)

But if I use Key.NumberLock, I don't get an error...I'm not sure if it's actually working correctly or not, though...

This is on macOS 12.4

Originally posted by @smithkyle in #102 (comment)

Hi @smithkyle 👋

macOS does not have a dedicated NumLock key, thus it throws an error if you try to press it.
Key.NumberLock is not a valid key at all, so even though it does not trigger an error, it also has no effect.

Best regards

Simon

Closed by #166

Thanks for your contribution, @smithkyle 💯