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

Error on listener #23

@A-DBN

Description

@A-DBN

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions