[Interest] Input devices auto detection
Константин Уткин
kostaui at mail.ru
Fri Jul 25 11:13:40 CEST 2014
Fri, 25 Jul 2014 10:56:32 +0200 от Konrad Rosenbaum <konrad at silmor.de>:
> On Friday 25 July 2014 06:21:06 Константин Уткин wrote:
> > I can plug any usb input devices and use them in my Qt apps only when I
> > know exact device name. For example, I can call app:
> > > . /myapp -plugin EvdevMouse:/dev/input/event3
> > > EvdevKeyboard:/dev/input/event6
> > But if need to launch app first, then plug USB devices in, I have no
> > chances to use these devices. So is there any way to solve a problem (in
> > case of EGLFS) ?
>
> At least for mouse you can use /dev/input/mice, which gives you the events
> of _all_ mice.
>
> I'm not sure how to solve this for keyboards, since I've never used Qt
> embedded.
>
>
> Konrad
>
I've already tried /dev/input/mice, unfortunately it worked only in one case:
when device was plugged in _before_ Qt application starts.
Anyway, I guess I can scan the device tree somehow and check for
plugging/unplugging devices. So (theoretically) I can "semi-autodetect"
input devices. In this case, can I inform running application and
make it use new device?
Best regards, Konstantin.
More information about the Interest
mailing list