linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* uinput problem
@ 2008-05-16 16:20 Tobias Müller
  2008-05-19 15:58 ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Müller @ 2008-05-16 16:20 UTC (permalink / raw)
  To: linux-input

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]

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 #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3389 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-19 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16 16:20 uinput problem Tobias Müller
2008-05-19 15:58 ` Dmitry Torokhov
2008-05-19 16:38   ` Tobias Müller
2008-05-19 17:20     ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).