Skip to content

Commit 246d843

Browse files
committed
docs(device): fix event type example names
1 parent 8ec572b commit 246d843

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

types/device.d.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function Device:ungrab() end
189189
---while true do
190190
--- if assert(dev:poll()) then
191191
--- local e = assert(dev:read())
192-
--- if e.type == e.EV_KEY then
192+
--- if e.type == ecodes.EV_KEY then
193193
--- print(e.code, e.value)
194194
--- end
195195
--- end
@@ -209,7 +209,7 @@ function Device:poll() end
209209
---local dev = assert(Device("/dev/input/eventX"))
210210
---
211211
---for e in dev:events() do
212-
--- if e.type == e.EV_KEY then
212+
--- if e.type == ecodes.EV_KEY then
213213
--- print(e.code, e.value)
214214
--- end
215215
---end
@@ -229,7 +229,7 @@ function Device:events() end
229229
---while true do
230230
--- if assert(dev:poll()) then
231231
--- local e = assert(dev:read())
232-
--- if e.type == e.EV_KEY then
232+
--- if e.type == ecodes.EV_KEY then
233233
--- print(e.code, e.value)
234234
--- end
235235
--- end

0 commit comments

Comments
 (0)