PDA

View Full Version : exporting QWS_KEYBOARD=LinuxInput:/dev/input/event0" hang application



binaural
7th September 2012, 23:20
Hi,

I'm trying to use usb keyboard for my qt application so I plug keyboard check hexdump /dev/input/event0
if getting events and define export QWS_KEYBOARD="LinuxInput:/dev/input/event0".
When I run any application it hang (also qt demo). I've double check if I have linuxinput support compiled
and it is. Any ideas what could cause such behavior?

qt4.8.2 - details : http://www.qtcentre.org/threads/50999-Moving-widget-to-second-screen-not-working
Thanks.

mbe

binaural
12th September 2012, 07:03
Update: there was an issue in qkbdlinuxinput_qws.cpp.
I just comment this part and it start working. This is just workaround
not solution but when have time will look and post proper patch upstream.
Cheers.


if (m_tty_fd >= 0) {
// save tty config for restore.
tcgetattr(m_tty_fd, &m_tty_attr);

struct ::termios termdata;
tcgetattr(m_tty_fd, &termdata);

// record the original mode so we can restore it again in the destructor.
::ioctl(m_tty_fd, KDGKBMODE, &m_orig_kbmode);

// setting this tranlation mode is even needed in INPUT mode to prevent
// the shell from also interpreting codes, if the process has a tty
// attached: e.g. Ctrl+C wouldn't copy, but kill the application.
::ioctl(m_tty_fd, KDSKBMODE, K_MEDIUMRAW);

// set the tty layer to pass-through
termdata.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
termdata.c_oflag = 0;
termdata.c_cflag = CREAD | CS8;
termdata.c_lflag = 0;
termdata.c_cc[VTIME]=0;
termdata.c_cc[VMIN]=1;
cfsetispeed(&termdata, 9600);
cfsetospeed(&termdata, 9600);
tcsetattr(m_tty_fd, TCSANOW, &termdata);