|
@@ -22,46 +22,22 @@ const INPUT_PROP_CNT = (INPUT_PROP_MAX + 1)
|
|
|
|
|
|
* Event types
|
|
|
*/
|
|
|
-type EventType uint
|
|
|
-
|
|
|
-const EV_SYN = EventType(0x00)
|
|
|
-const EV_KEY = EventType(0x01)
|
|
|
-const EV_REL = EventType(0x02)
|
|
|
-const EV_ABS = EventType(0x03)
|
|
|
-const EV_MSC = EventType(0x04)
|
|
|
-const EV_SW = EventType(0x05)
|
|
|
-const EV_LED = EventType(0x11)
|
|
|
-const EV_SND = EventType(0x12)
|
|
|
-const EV_REP = EventType(0x14)
|
|
|
-const EV_FF = EventType(0x15)
|
|
|
-const EV_PWR = EventType(0x16)
|
|
|
-const EV_FF_STATUS = EventType(0x17)
|
|
|
-const EV_MAX = EventType(0x1f)
|
|
|
+const EV_SYN = 0x00
|
|
|
+const EV_KEY = 0x01
|
|
|
+const EV_REL = 0x02
|
|
|
+const EV_ABS = 0x03
|
|
|
+const EV_MSC = 0x04
|
|
|
+const EV_SW = 0x05
|
|
|
+const EV_LED = 0x11
|
|
|
+const EV_SND = 0x12
|
|
|
+const EV_REP = 0x14
|
|
|
+const EV_FF = 0x15
|
|
|
+const EV_PWR = 0x16
|
|
|
+const EV_FF_STATUS = 0x17
|
|
|
+const EV_MAX = 0x1f
|
|
|
const EV_CNT = (EV_MAX+1)
|
|
|
|
|
|
|
|
|
-func (e EventType) String() string {
|
|
|
- switch e {
|
|
|
- case EV_SYN: return "EV_SYN"
|
|
|
- case EV_KEY: return "EV_KEY"
|
|
|
- case EV_REL: return "EV_REL"
|
|
|
- case EV_ABS: return "EV_ABS"
|
|
|
- case EV_MSC: return "EV_MSC"
|
|
|
- case EV_SW : return "EV_SW"
|
|
|
- case EV_LED: return "EV_LED"
|
|
|
- case EV_SND: return "EV_SND"
|
|
|
- case EV_REP: return "EV_REP"
|
|
|
- case EV_FF : return "EV_FF"
|
|
|
- case EV_PWR: return "EV_PWR"
|
|
|
- case EV_FF_STATUS: return "EV_FF_STATUS"
|
|
|
- case EV_MAX: return "EV_MAX"
|
|
|
- case EV_CNT: return "EV_CNT"
|
|
|
- default: return "Unknown event"
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
* Synchronization events.
|
|
|
*/
|