Kivy touch events not working on Raspberry PI with Adafruit PiTFT
See original GitHub issueHi!
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
Issue Analytics
- State:
- Created 9 years ago
- Comments:40 (14 by maintainers)
Top Results From Across the Web
PiTFT Plus - 2.8" TOUCHSCREEN NOT WORKING
I have installed an PiTFT Plus - 2.8" resistive TOUCHSCREEN on my Pi2. The screen is working fine, but the touchscreen does not...
Read more >Touchscreen not detecting on_touch_down in kivy - python
I recently got a raspberry pi 4 and i am now trying to build a python GUI application with kivy. I have everything...
Read more >Pitoucon: Raspi touch panel with Kivy and MQTT - weigu.lu
I bought a 3.5" PiTFT from Adafruit and use it with a Raspberry Pi 3. The Pi is connected over WiFi an is...
Read more >kivy@groups.io | New Comment on Issue
[kivy:master] New Comment on Issue #2656 Kivy touch events not working on Raspberry PI with Adafruit PiTFT. By illumin-us-r3v0lution:.
Read more >Kivy and 3.5PiTFT - Raspberry Pi Stack Exchange
I just got it working under the Adafruit Raspbian Jessie image (although I am ... If you run into problems where the RESISTIVE...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!
@tito I am facing issue even displaying anything on the touchscreen. The screen is calibrated (I don’t use X either). Event test works (ts_test & evtest). Please let me know how to display the UI on touch display instead of HDMI. (I have tried the usual methods FRAMEBUFFER variable & DISPLAY variable)