public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chase Douglas <chase.douglas@canonical.com>
To: Peter Hutterer <peter.hutterer@who-t.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Henrik Rydberg <rydberg@euromail.se>,
	Chris Bagwell <chris@cnpbagwell.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] Documentation: Add evdev type and code definitions
Date: Fri, 07 Jan 2011 15:34:47 -0500	[thread overview]
Message-ID: <4D2778E7.4000201@canonical.com> (raw)
In-Reply-To: <20101215235900.GA4952@salty.local>

On 12/15/2010 06:59 PM, Peter Hutterer wrote:
> On Tue, Dec 14, 2010 at 01:21:10PM -0800, Chase Douglas wrote:
>> +EV_KEY events take the form KEY_<name> or BTN_<name>. For example, KEY_A is used
>> +to represent the 'A' key on a keyboard. When a key is depressed, an event with
>> +the key's code is emitted with value 1. When the key is depressed, an event is
>> +emitted with value 0. In general, KEY_<name> is used for keyboard keys, and
>> +BTN_<name> is used for other types of momentary switch events.
> 
> repeat keys have value 2, might want to add this here.

Done.

>> +* BTN_TOOL_<name>, BTN_TOUCH:
>> +  - These codes are used in conjunction with input trackpads, tablets, and
>> +    touchscreens. These devices may be used with fingers, pens, or other tools.
>> +    When an event occurs and a tool is used, the corresponding BTN_TOOL_<name>
>> +    code should be set to a value of 1. When the tool is no longer interacting
>> +    with the input device, the BTN_TOOL_<name> code should be reset to 0. All
>> +    trackpads, tablets, and touchscreens should use at least one BTN_TOOL_<name>
>> +    code when events are generated. For non-tablet devices, the tool is usually
>> +    BTN_TOUCH.
> 
> BTN_TOUCH is used as proximity delimiter. e.g. wacom sends BTN_TOOL_PEN when
> the pen comes into proximity and (in addition) BTN_TOUCH when the pen
> actually touches the tablet. synaptics does the same IIRC except that it
> doesn't support hovering, so BTN_TOOL_FINGER and BTN_TOUCH are always
> set/unset in the same EV_SYN frame.

I've added wording for this.

>> +* REL_WHEEL, REL_HWHEEL:
>> +  - These codes are used for vertical and horizontal scroll wheels,
>> +    respectively.
> 
> I'm not sure they're special, other than in X where we still treat them as
> buttons by convention. It's good to describe them here, just in case, but I
> wouldn't call that a "special meaning".

In my mind I thought people may confuse this with a generic knob input
device. I've seen these in the local Apple store, and I believe they are
used primarily for professional a/v editing to go forward and backward
in time. I don't believe such devices should be using either of these
codes, so I defined the codes to be for scroll wheels.

Any objections?

>> +* ABS_PRESSURE:
>> +  - Used to describe the pressure of a touch interaction on an input device.
> 
> again, that's not really special IMO. it pretty much does what it says on
> the box :)

I think I had something in mind for this like the above REL_WHEEL, but I
can't think of it now. After re-reading this description, I don't think
it yields any new information that can't be gleaned from the code name
itself, so I've yanked it from the document.

> fwiw, I know that even though the documentation should be enough as-is,
> having a few simple examples are always really useful to form the picture in
> one's head. especially for newcomers who don't understand the basic concepts
> yet.
> 
> just something like:
> "for example, an absolute device moving to a new position and pressing and
> releasing a button may send events like this:
> code            value
> -----------------------
> ABS_X           10
> ABS_Y           100
> BTN_LEFT        1
> EV_SYN          SYN_REPORT
> BTN_LEFT        0
> EV_SYN          SYN_REPORT
> 
> This immediately makes it obvious that buttons and axes can be mixed in the
> same frame. you may want to also point to a few tools that show the event
> stream (evtest comes to mind as the most widely distributed).

I would like to see this as well, but I think I'll leave the initial
commit to just the protocol documentation. We should add these in a
subsequent commit (and I'm running out of time at the moment :).

Thanks!

-- Chase

  parent reply	other threads:[~2011-01-07 20:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14 21:21 [PATCH 0/4] Alternative approach to MT_TOOL_ENVELOPE Chase Douglas
2010-12-14 21:21 ` [PATCH 1/4] Revert "input: mt: Interface and MT_TOOL documentation updates" Chase Douglas
2010-12-14 21:21 ` [PATCH 2/4] Documentation: Add evdev type and code definitions Chase Douglas
2010-12-15 23:59   ` Peter Hutterer
2010-12-16 14:56     ` Chris Bagwell
2010-12-16 16:57       ` Dmitry Torokhov
2011-01-07 20:39       ` Chase Douglas
2011-01-07 20:34     ` Chase Douglas [this message]
2010-12-16 14:12   ` Henrik Rydberg
2011-01-07 20:43     ` Chase Douglas
2010-12-17 10:18   ` Nikolai Kondrashov
2010-12-14 21:21 ` [PATCH 3/4] Input: Add ABS_RECT_* legacy multitouch evdev codes Chase Douglas
2010-12-14 21:21 ` [PATCH 4/4] Input: synaptics - Add support for ABS_RECT_* Chase Douglas
2010-12-14 21:38 ` [PATCH 0/4] Alternative approach to MT_TOOL_ENVELOPE Chase Douglas
2010-12-14 22:12 ` Dmitry Torokhov
2010-12-15  0:21   ` Chase Douglas
2010-12-15  1:37     ` Henrik Rydberg
2010-12-15  7:25       ` Dmitry Torokhov
2010-12-15 17:31         ` Chase Douglas
2010-12-15 20:25           ` Chris Bagwell

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=4D2778E7.4000201@canonical.com \
    --to=chase.douglas@canonical.com \
    --cc=chris@cnpbagwell.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    --cc=rydberg@euromail.se \
    /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