I have kivy installed on a raspberry pi 3B with the official 7" touchscreen attached. The touchscreen its self works perfectly and touch input is working as expected in the desktop environment.
I can run code to show a kivy app and it displays fine but when I touch the touchscreen I get the following error in the terminal:
''' INFO: The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list EVDEV KeyCode 330 '''
This happens on both pressing the display and lifting off. I have tried executing the app through both the CLI and through a terminal in the desktop environment. Nothing else is installed on the raspberry pi apart from the requirements for kivy. I have tried adding these three lines to ~/.kivy/config.ini as suggested elsewhere but it makes no difference.
''' mouse = mouse mtdev_%(name)s = probesysfs,provider=mtdev hid_%(name)s = probesysfs,provider=hidinput '''
How can I get the touchscreen to apply my touch inputs correctly in my kivy app?
Edit: Contents of the file at ~/.kivy/config.ini
"""
[kivy]
keyboard_repeat_delay = 300
keyboard_repeat_rate = 30
log_dir = logs
log_enable = 1
log_level = info
log_name = kivy_%y-%m-%d_%_.txt
window_icon =
keyboard_mode =
keyboard_layout = qwerty
desktop = 1
exit_on_escape = 1
pause_on_minimize = 0
kivy_clock = default
default_font = ['Roboto', 'data/fonts/Roboto-Regular.ttf', 'data/fonts/Roboto-I$
log_maxfiles = 100
window_shape = data/images/defaultshape.png
config_version = 21
[graphics]
display = -1
fullscreen = 0
height = 600
left = 0
maxfps = 60
multisamples = 2
position = auto
rotation = 0
show_cursor = 1
top = 0
width = 800
resizable = 1
borderless = 0
window_state = visible
minimum_width = 0
minimum_height = 0
min_state_time = .035
allow_screensaver = 1
shaped = 0
[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput
[postproc]
double_tap_distance = 20
double_tap_time = 250
ignore = []
jitter_distance = 0
jitter_ignore_devices = mouse,mactouch,
retain_distance = 50
retain_time = 0
triple_tap_distance = 20
triple_tap_time = 375
[widgets]
scroll_timeout = 250
scroll_distance = 20
scroll_friction = 1.
scroll_stoptime = 300
scroll_moves = 5
[modules]
[network]
useragent = curl
"""
Edit2: Python file being run:
Taken from kivy documentation at https://kivy.org/doc/stable/guide/basic.html
import kivy
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text='Hello world')
if __name__ == '__main__':
MyApp().run()
.ini
file? – abolotnov Oct 3 '19 at 4:33