Re: uinput problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dmitry!

Dmitry Torokhov wrote:
Are you working in the console or in X?
In X. I tried it in the console and it seems to work. Problem occurs only within X.

What keyboard driver are you using?
In xorg.conf is Driver "keyboard"
set.

You may want to send EV_SYN/SYN_REPORT calls in between
keypress events since consumers might rely on them.

I added a function

void SysSync(int fd) {
	struct input_event ev;
	memset (&ev, 0, sizeof(ev));
	ev.type=EV_SYN; ev.code=SYN_REPORT; ev.value=0;
	write (fd, &ev, sizeof(ev));
}
and then tried

	SysKeypress (uinput_fd, KEY_LEFTSHIFT, 1);
	SysSync(uinput_fd);
	SysKeypress (uinput_fd, KEY_1, 1);
	SysSync(uinput_fd);
	SysKeypress (uinput_fd, KEY_1, 0);
	SysSync(uinput_fd);
	SysKeypress (uinput_fd, KEY_LEFTSHIFT, 0);
	SysSync(uinput_fd);

	SysKeypress (uinput_fd, KEY_1, 1);
	SysSync(uinput_fd);
	SysKeypress (uinput_fd, KEY_1, 0);
	SysSync(uinput_fd);

but same behaviour within X.

Regards
 Tobias




Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux