Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant