kivy: Kivy touch events not working on Raspberry PI with Adafruit PiTFT
Hi!
I have an Adafruit 2.8in LCD with a resistive touchscreen [1], connected to a Raspberry Pi and working with Kivy. I have had to use fbcp [2] to get this setup to work with Kivy, but that is fine. While I have seen issues with idle apps using 30-40% CPU (as per htop), the primary blocker in my setup is that the touchscreen errors out with Kivy.
I can create a Button in a Kivy App and press it, Kivy does see the touch, but errors out:
[INFO ] [HIDMotionEvent] using <stmpe-ts>
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/pi/kivy/kivy/input/providers/hidinput.py", line 580, in _thread_run
process_as_mouse_or_keyboard(*infos)
File "/home/pi/kivy/kivy/input/providers/hidinput.py", line 456, in process_as_mouse_or_keyboard
l = keyboard_keys[ev_code][-1 if 'shift' in Window._modifiers else 0]
KeyError: 330
Here are a few additional notes:
- After this, I am unable to get another button press to register in the log, but the app is still running and updating the screen.
- The above errors were seen with kKivy installed from git master from a few days ago, I will update to latest master and retry.
- I can debug, build, etc, specific branches, patches, etc… anything to help this move along.
[1] https://www.adafruit.com/prohttps://www.adafruit.com/product/1601duct/1601 [2] https://github.com/tasanakorn/rpi-fbcp
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 40 (14 by maintainers)
Commits related to this issue
- hidinput: supports Rpi touchscreen by processing standard ABS X/Y/Pressure events. Ref #2656 — committed to kivy/kivy by tito 10 years ago
- possible fix for #2656 — committed to kivy/kivy by deleted user 10 years ago
It finally works for @illumin-us-r3v0lution. As he said on irc:
<luminous> param=rotation=270,param=invert_y=1 <luminous> ,param=rotation=90,param=invert_x=1
Both works. Let’s merge into master!