From: "Tobias Müller" <Tobias_Mueller@twam.info>
To: linux-input@vger.kernel.org
Subject: uinput problem
Date: Fri, 16 May 2008 18:20:17 +0200 [thread overview]
Message-ID: <482DB441.7020205@twam.info> (raw)
[-- 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 --]
next reply other threads:[~2008-05-16 16:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-16 16:20 Tobias Müller [this message]
2008-05-19 15:58 ` uinput problem Dmitry Torokhov
2008-05-19 16:38 ` Tobias Müller
2008-05-19 17:20 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=482DB441.7020205@twam.info \
--to=tobias_mueller@twam.info \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).