How can I detect touchscreen as Mouse?
Hi,
This is my first thread here. I am working with an embedded-linux device. Linux kernel version is 4.6 and It was built with Yocto 2.4. I am building a Qt app that runs in the device. I have a problem when the app is running in a certain time when I press touchscreen the app freezes. I have read a lot of forums and documentation and I am almost sure that the problem is in xlib driver that locks the display. The linux os has xorg, evded to detect input diveces. One of my ideas is to detect touchscreen input as mouse input to not get this lock display. There is a way to configure evdev or x11 to do this? |
Examine the Xorg log for current input driver assignment. For example...
Code:
grep -i "Using input" /var/log/Xorg.0.log Code:
Section "InputClass" |
It really depends. A touch screen is not a mouse instead it's XY input and when a finger or fingers are down. Trying to treat it as a mouse may not help.
Doesn't this board have a first sample Qt app that works? |
Yes, it may well depend on the hardware implementation, but most touchpad devices for example are still capable of providing basic "PS/2 mouse" compatibility even when not yet properly supported by a kernel. Assuming that touch-screens are similar in that regard?
|
Quote:
I checked the Xorg log and got: [ 10.907] (II) Using input driver 'libinput' for 'da9063-onkey' [ 10.955] (II) Using input driver 'libinput' for 'AD7879 Touchscreen' The AD7879 is the touchscreen driver that I am using. In /usr/share/X11/Xorg.conf.d are tow con files, 10-evdev.conf and 40-libinput.conf. In 10-evdev.conf I have: # # Catch-all evdev loader for udev-based systems # We don't simply match on any device since that also adds accelerometers # and other devices that we don't really want to use. The list below # matches everything but joysticks. Section "InputClass" Identifier "evdev pointer catchall" MatchIsPointer "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev tablet catchall" MatchIsTablet "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection In 40-libinput.conf I have: # # Catch-all evdev loader for udev-based systems # We don't simply match on any device since that also adds accelerometers # and other devices that we don't really want to use. The list below # matches everything but joysticks. Section "InputClass" Identifier "evdev pointer catchall" MatchIsPointer "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev tablet catchall" MatchIsTablet "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Do yo think that there is a way to change come configuration here to detect touchscreen as a mouse? |
Quote:
|
Quote:
I have two files config in /usr/share/X11/xorg.conf.d folder, one for evdev and another for libinput, in both I have: Section "InputClass" Identifier "libinput touchscreen catchall" MatchIsTouchscreen "off" MatchDevicePath "/dev/input/event*" Driver "libinput" EndSection I think that I have to use one of both, evdev or libinput, I am not sure of that. How do I know what I am using? How can I change what of both use? I think that I am using libinput but I am not sure. |
Quote:
https://linux.die.net/man/4/mousedrv A good wiki page https://wiki.archlinux.org/index.php/Touchscreen Quote:
https://wiki.archlinux.org/index.php/Xorg#Input_devices |
All times are GMT -5. The time now is 02:39 AM. |