aboutsummaryrefslogtreecommitdiffhomepage
path: root/evdev.lua
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2023-09-22 15:30:26 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2023-09-22 15:30:26 +0300
commitda322583bf0113e025de6a692ec6a735a0badc99 (patch)
tree728bd88d593d65ee3f860651954b1ffa3505bc6e /evdev.lua
parent5011450c665009c0feb722016f381c087307ed0a (diff)
downloadapplause2-da322583bf0113e025de6a692ec6a735a0badc99.tar.gz
Stream:evkey(): result stream will now contain the key id if the key is pressed, as it was previously documented
Diffstat (limited to 'evdev.lua')
-rw-r--r--evdev.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/evdev.lua b/evdev.lua
index a3a304e..334cc80 100644
--- a/evdev.lua
+++ b/evdev.lua
@@ -210,6 +210,6 @@ function Stream:evkey(key)
return self:scan(function(last, sample)
last = last or 0
return sample.type == C.EV_KEY and sample.code == key and
- sample.value or last
+ (sample.value ~= 0 and key or 0) or last
end)
end