From: Jose Diez <jose@mediacru.sh>
To: linux-input <linux-input@vger.kernel.org>
Subject: Help with input_report_key not reporting key
Date: Sun, 09 Nov 2014 10:57:51 +0000 [thread overview]
Message-ID: <545F48AF.7040206@mediacru.sh> (raw)
Hello linux-input,
Sorry to post about a similar question again, but I'm still stuck. So a
bit of back story: I'm writing a custom HID driver which, among other
things, will register several input devices.
I'm able to read HID reports from the device using the raw_event
callback, and I'm able to communicate with the device, but I seem to
have hit an obstacle I can't get over. I've tried to add a proper input
device to the driver, and while it registers it properly and shows up in
/dev/input/*, the events seem to not go through.
I found this simple kernel module, which indeed works properly and
reports key events: http://sprunge.us/NLcD
I then adapted it to work with my kernel module, shown here:
http://sprunge.us/egIi
It allocates the input device in fblng_probe(), sets the KEY_A bit in
the keybit field, and registers it. Then, when a request comes to the
device, in fblng_event(), I (try to) send a key with input_report_key.
This doesn't seem to trigger a keypress.
I'm looking at the relevant /dev/input/eventX with `evtest`. I know I'm
getting events through, because I can see it in `dmesg`. However, it
doesn't actually go through to the input handler.
Any help, please?
Thanks a lot,
Jose
next reply other threads:[~2014-11-09 10:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-09 10:57 Jose Diez [this message]
2014-11-09 14:04 ` Help with input_report_key not reporting key Jose Diez
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=545F48AF.7040206@mediacru.sh \
--to=jose@mediacru.sh \
--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).