uinput problem

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

 



Hello everybody,

I'm trying to write a small userspace program to receive keys via rs232 and sent the corresponding key events.

Everything seems to work fine, except when I'm sending something like Aa oder aA where die keycode is the same. Then only AA or aa is recognized. I did't set the EV_REP bit because i don't need any auto-repeat features.

I'm sending the events via the following function.

void SysKeypress(int fd, int code, int down) {
	struct input_event ev;
	memset (&ev, 0, sizeof(ev));
	ev.type=EV_KEY; ev.code=code; ev.value=down;
	write (fd, &ev, sizeof(ev));
}

and if I hardcode an

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

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

it only receices an !! and if I change the blocks an 11.

I read the documentfile about input drivers, but i didn't find anything special about uinput.

I can't see what I'm doing wrong and hope someone might help me.
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