kivy中的USB游戏杆在process_as_mouse_or_keyboard上失败

时间:2018-08-06 23:49:23

标签: python kivy joystick

我正尝试使用DragonRise USB控制器为kivy项目添加许多按钮和操纵杆。

使用示例代码here,得到以下输出:

[INFO   ] [HIDMotionEvent] using <E-Signal/A-One USB Gaming Mouse>
[INFO   ] [HIDMotionEvent] using <SONiX USB DEVICE>
[INFO   ] [HIDMotionEvent] using <DragonRise Inc.   Generic   USB  Joystick  >
[INFO   ] [HIDMotionEvent] <DragonRise Inc.   Generic   USB  Joystick  > range ABS X position is 0 - 255
[INFO   ] [HIDMotionEvent] <DragonRise Inc.   Generic   USB  Joystick  > range ABS Y position is 0 - 255
[INFO   ] [HIDMotionEvent] using <E-Signal/A-One USB Gaming Mouse>
[INFO   ] [HIDMotionEvent] <SONiX USB DEVICE> range position X is 0 - 255
[INFO   ] [HIDMotionEvent] <SONiX USB DEVICE> range position Y is 0 - 255
[INFO   ] [HIDMotionEvent] <SONiX USB DEVICE> range pressure is 0 - 255
[INFO   ] [HIDMotionEvent] using <SONiX USB DEVICE>
 Exception in thread Thread-3:
 Traceback (most recent call last):
   File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
     self.run()
   File "/usr/lib/python2.7/threading.py", line 754, in run
     self.__target(*self.__args, **self.__kwargs)
   File "/home/pi/kivy/kivy/input/providers/hidinput.py", line 700, in _thread_run
     process_as_mouse_or_keyboard(*infos)
   File "/home/pi/kivy/kivy/input/providers/hidinput.py", line 551, in process_as_mouse_or_keyboard
     z = keyboard_keys[ev_code][-1
 KeyError: 290

我忘记了什么吗?操纵杆可以与jstest配合使用吗?

0 个答案:

没有答案