[Development] Fixing input for eglfs and friends
johannes.zellner at nokia.com
Wed May 23 22:36:54 CEST 2012
as we are working on better support of embedded devices in Qt, we also are
tapping into the input handling.
The initial issue with our current input handling for platforms like eglfs,
which do not handle input on its own, is, that we have input plugins for
mouse/keyboard/touch (evdev), which are seperate from each other.
So one needs to specify "-plugin evdevkeyboard" on the commandline in order to
get keyboard input. The evdev* plugins are trying to use udev to detect all
available devices and also handle the remove and add events for such input
To get rid of the -plugin argument we would like to create the
keyboard/mouse/touch plugins always from eglfs directly. This works fine when
udev is present, but fails badly without udev, as all plugins currently
default to event0, if you dont specify the device explicitly again on the
A fix would be to add a fallback device discovery, which picks up all available
devices without udev and creates the specific keyboard/mouse handler.
But this raised the problem of the lack of detecting if its a keyboard or
mouse or whatever from the evdev side, as evdev does not have such a
destinction. It just handles input events and does not care if its a key or
mouse event. Thus udev has some tricks to probe different attributes through
evdev to get the device type, which I dont really want to pull into our code.
For those reasons, I will go ahead and merge evdevkeyboard and evdevmouse as a
start. The merge potentially also adds the ability to properly send key and
mouse events from devices, that have both event types (like a scroll wheel on
I cannot merge evdevtouch for now, since I dont have a proper touchdevice to
Also the udev part in platformsupport will get a fallback to detect devices at
Are there any concerns or better ways to solve the currently broken out-of-the
box experience with eglfs and such?
More information about the Development