tomzx / gkm

⚠ Unsupported/Unmaintained ⚠️️ Global Keyboard and Mouse listener for node.js.
MIT License
52 stars 16 forks source link

Is there any way to prevent the released event from firing? #25

Open compscitwilight opened 1 year ago

compscitwilight commented 1 year ago
const gkm = require("gkm")

gkm.events.on("key.*", function (data) {
    if (data.includes("Undefined")) return
    console.log(data)
})

image

Using the "key.*" event also detects when a key is released. How can I prevent this from happening?

Moonlite-Kitsune commented 1 year ago

through testing i've found that key.released works for detecting key presses and key.pressed is helpful for rapid fire the question itself is vague and the documentation for this system is lacking if you need something else in particular could you please clarify in a response