From: "Tobias Müller" <Tobias_Mueller@twam.info>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org
Subject: Re: uinput problem
Date: Mon, 19 May 2008 18:38:55 +0200 [thread overview]
Message-ID: <4831AD1F.2000606@twam.info> (raw)
In-Reply-To: <20080519115457.ZZRA012@mailhub.coreip.homeip.net>
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
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 #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3389 bytes --]
next prev parent reply other threads:[~2008-05-19 16:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=4831AD1F.2000606@twam.info \
--to=tobias_mueller@twam.info \
--cc=dmitry.torokhov@gmail.com \
--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).