Hello, If Qt was configured with libudev support then mice and keyboards will be recognized even when connected after starting the application.
If the libudev headers and libs were not present at configure time then hotplugging will not work. Mice & keyboards will still be picked up automatically (using fallback method based on a simple walkthrough of /dev/input/event*), but this is done only once, on application startup. The fact that you need to explicitly specify the device nodes is somewhat weird. A normal keyboard or mouse should be picked up automatically, regardless of having or not having libudev support. Best regards, Laszlo ________________________________________ From: interest-bounces+laszlo.agocs=digia....@qt-project.org [interest-bounces+laszlo.agocs=digia....@qt-project.org] on behalf of Константин Уткин [kost...@mail.ru] Sent: Friday, July 25, 2014 11:13 AM To: Konrad Rosenbaum Cc: interest@qt-project.org Subject: Re: [Interest] Input devices auto detection Fri, 25 Jul 2014 10:56:32 +0200 от Konrad Rosenbaum <kon...@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. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest