1

I have Raspberry Pi with 3.5 in TFT (resisitive) touchscreen installed, and small application written in Kivy. When I'm on Desktop then mouse and touch work as expected (in particular are not rotated), however when I'm on kivy application then mouse works as expected (in particular is not rotated), but touch is rotated (when I move finger up, arrow goes right; when I move finger right, arrow goes down; when I move finger down arrow goes left, so it appears that touch is rotated 90 degres (clockwise)).

There was a dispute on the display rotations https://github.com/kivy/kivy/issues/2656 however it didnt't bring me to the final solution yet.

In .kivy/config.ini I have: [input] mouse = mouse mtdev_%(name)s = probesysfs,provider=mtdev hid_%(name)s = probesysfs,provider=hidinput

when I modify the last line to hid_%(name)s = probesysfs,provider=hidinput,param=rotation=270 I have some effect, but not the one I want: touch is affected, but mouse is also affected i.e. rotated (so mouse is spoiled, when I move mouse up, the arrow goes left, etc.).

I tried also pitft = mtdev,/dev/input/touchscreen,max_position_x=240,max_position_y=320,invert_y=0,invert_x=1,rotation=270 of Kivy and 3.5PiTFT and still without success

Question: How to change configuration so only touch is modified (rotated)?

Versions
Python: 2.7.9
OS: Raspian Jessie
Kivy: v1.10.0
Kivy installation method: From package, which is taken form archive.mitako.eu/ jessie
so following instruction "install KivyPie runtime on Raspbian" of http://kivypie.mitako.eu/kivy-faq.html

1

I am using Kivy 1.10+ and in the .kivy/config.ini file you can find the [graphics] section. There, I have added the rotation=90 option to make it run in vertical mode. But I am running Kivy without xserver so I'm not sure wether the mouse is affected by that.

0

I added below to fix, as I had exact same problem. My mouse worked fine, but the touch on Kivy went in opposite direction. When I moved up, cursor went down and vice versa. Please see below

[input]
mouse = mouse
hid_%(name)s = probesysfs, provider=hidinput,param=invert_y=0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.