下面是獲取到的部分信息:
add device 5: /dev/input/event5
02-10 17:42:12.226 14965 14988 I System.out com.mycompany.myapp7 events:
02-10 17:42:12.226 14965 14988 I System.out com.mycompany.myapp7 0145* 014a*
02-10 17:42:12.236 14965 14988 I System.out com.mycompany.myapp7 0001 : value 0, min 0, max 2214, fuzz 0, flat 0, resolution 0
02-10 17:42:12.256 14965 14988 I System.out com.mycompany.myapp7 002f : value 0, min 0, max 9, fuzz 0, flat 0, resolution 0
02-10 17:42:12.266 14965 14988 I System.out com.mycompany.myapp7 0035 : value 0, min 0, max 1334, fuzz 0, flat 0, resolution 0
02-10 17:42:12.276 14965 14988 I System.out com.mycompany.myapp7 0039 : value 0, min 0, max 65535, fuzz 0, flat 0, resolution 0
02-10 17:42:12.276 14965 14988 I System.out com.mycompany.myapp7 input props:
02-10 17:42:12.286 14965 14988 I System.out com.mycompany.myapp7 add device 6: /dev/input/event6
02-10 17:42:12.286 14965 14988 I System.out com.mycompany.myapp7 events:
02-10 17:42:12.296 14965 14988 I System.out com.mycompany.myapp7 input props:
02-10 17:42:12.316 14965 14988 I System.out com.mycompany.myapp7 add device 7: /dev/input/event7
02-10 17:42:12.391 14965 14988 I System.out com.mycompany.myapp7 events:
02-10 17:42:12.391 14965 14988 I System.out com.mycompany.myapp7 input props:
02-10 17:42:12.391 14965 14988 I System.out com.mycompany.myapp7 add device 8: /dev/input/event2
02-10 17:42:12.396 14965 14988 I System.out com.mycompany.myapp7 events:
02-10 17:42:12.396 14965 14988 I System.out com.mycompany.myapp7 0005 : value 0, min -32768, max 32767, fuzz 0, flat 0, resolution 0
02-10 17:42:12.401 14965 14988 I System.out com.mycompany.myapp7 0007 : value 0, min 0, max 3, fuzz 0, flat 0, resolution 0
解決方法是用read而不是readline