Raspbian running on RPi3B+, Qt5.9.2 cross-compiled, QWidget application. The keyboard input goes to the shell behind instead to my application. Following this document I set the following env vars:
LD_LIBRARY_PATH=/home/pi/bin
QT_QPA_EVDEV_KEYBOARD_PARAMETERS=/dev/input/event1;grab=1
QT_QPA_ENABLE_TERMINAL_KEYBOARD=1
QT_QPA_GENERIC_PLUGINS=evdevmouse,evdevkeyboard
QT_QPA_EGLFS_FORCE888=1
QT_QPA_PLATFORM=eglfs
QT_QPA_EGLFS_DEBUG=1
and tried to run the application either locally (i.e. sitting in front of the target) or via SSH. The behavior is the same.
Instead, the mouse works fine.
Is there something I didn't understand in that document?
It works for me with:
and running with:
I think
sudo
is needed because of what documentation says about/dev/input/event*
permissions. Also-E
option is needed so that sudo preserves the exported variables.I hope this help.
Qt for Embedded Linux
I want to share additional information about my previous response:
This is the list of exports with which I prevent that the mouse and keyboard events were passed to the terminal and the X11 system from my app:
Note that
export QT_QPA_EGLFS_NO_LIBINPUT=1
is necessary so Qt's ownevdev
handlers come in to play and consequentlyQT_QPA_EVDEV*
options take into account. That is what I could verify.Qt for Embedded Linux
Also, as a comment, I tried this configuration, first with a mouse and keyboard controlled with a same USB (Logitech) and like that: the keyboard worked correctly but not the mouse. So I decided to try with independent mouse and keyboard, and now both (mouse & keyboard) work correctly.
Nor do I have to run my application with
SUDO
orSUDO -E
, since the directory/dev/input/event*
has read/write permissions for the'input'
group and my user is part of that group.Regards!