mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "George Spelvin" <linux@horizon.com>
To: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: linux@horizon.com
Subject: Where are the semantics of MSC_SCAN & MSC_RAW input events defined?
Date: 31 Dec 2010 19:51:09 -0500	[thread overview]
Message-ID: <20110101005109.11018.qmail@science.horizon.com> (raw)

I'm trying to rework the ati-remote.c driver to use the input layer
better, such as supporting keyboard remapping.

And I'm finding documentation on the input layer... lacking.  What's the
point of these two event types?  Should I emit either or both when someone
presses a button?  Does it matter if the button has an EV_KEY mapping?

If I should generate multiple input events for one keypress, what order
should they be in?

I notice that atkbd.c generates MSC_SCAN, then EV_KEY.
But Documentation/laptops/thinkpad-acpi.txt says
"A Hot key is mapped to a single input layer EV_KEY event, possibly
followed by an EV_MSC MSC_SCAN event."

I notice there was a proposed patch to fix this in 2007:
http://www.mail-archive.com/linux-input@atrey.karlin.mff.cuni.cz/msg00482.html

This recommends generating EV_KEY/KEY_UNKNOWN events for unfamiliar keys,
which atkbd.c (probably the most-used input handler) does not do.


The other question is that the ATI remote retransmits scan codes while
they key is held down, and key-up has to be inferred via a timeout.
Should I generate an MSC_SCAN event for each true reception, or only
for the synthesized key events?


I have a few other questions about the input layer:
- Should I fill in the input_id with the BUS_USB and the
  device's idVendor, idProduct, and bcdDevice?
- What should I put in the input->phys and input->uniq fields?

Thank you!

                 reply	other threads:[~2011-01-01  0:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20110101005109.11018.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®