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

Error on listener #23

Open
A-DBN opened this issue Jul 22, 2022 · 0 comments
Open

Error on listener #23

A-DBN opened this issue Jul 22, 2022 · 0 comments

Comments

@A-DBN
Copy link

A-DBN commented Jul 22, 2022

Hi, I have a problem when pressing a key with the function onKey

Here is my code:

v.addListener('keydown', (e, down) => {
    if (e.key === 'L' && down['LEFT CTRL'] && e.state === 'DOWN') {
        isActive = !false
    }
})

Here is the error:

TypeError: onKey is not a function
    at WinKeyServer.GlobalKeyboardListener.baseListener [as listener] 
    at Socket.<anonymous> (C:\Users\adabi\Desktop\Epitech\Dofus_Passe_Tour\node_modules\node-global-key-listener\build\ts\WinKeyServer.js:36:48)
    at Socket.emit (node:events:539:35)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:285:11)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
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

1 participant