mirror of
https://gitee.com/open-loongarch/buildroot-2024.08.git
synced 2026-10-26 21:27:10 +08:00
first commit: base 2024.08
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import evdev
|
||||
|
||||
devices = [evdev.InputDevice(path) for path in evdev.list_devices()]
|
||||
e = evdev.events.InputEvent(1036996631, 984417, evdev.ecodes.EV_KEY, evdev.ecodes.KEY_A, 2)
|
||||
k = evdev.events.KeyEvent(e)
|
||||
|
||||
assert(k.keystate == evdev.events.KeyEvent.key_hold)
|
||||
assert(k.event == e)
|
||||
assert(k.scancode == evdev.ecodes.KEY_A)
|
||||
assert(k.keycode == 'KEY_A')
|
||||
assert(len(devices) > 0)
|
||||
Reference in New Issue
Block a user