We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6cdc16e commit 0b98adaCopy full SHA for 0b98ada
1 file changed
docs/src/evdev/api/ecodes.md
@@ -1,5 +1,21 @@
1
# `ecodes`
2
3
+Linux input event code constants used when reading events from `/dev/input` or
4
+emitting events through `uinput`.
5
+
6
+```lua
7
+local evdev = require "evdev"
8
9
+local Device = evdev.device.open
10
+local dev = assert(Device("/dev/input/event3"))
11
12
+for e in dev:events() do
13
+ if e.type == evdev.ecodes.EV_KEY and e.code == evdev.ecodes.KEY_ENTER then
14
+ print("Enter key event", e.value)
15
+ end
16
+end
17
+```
18
19
## EV
20
21
Event type constants used in the `type` field of Linux input events.
0 commit comments