Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ping Cheng
Date: Tuesday, November 23, 2010 - 10:40 am

On Sun, Nov 21, 2010 at 11:55 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:

Don't be sorry, Dmitry. Your statement is fair since:

1.  I did not explain it clearly;
2.  You do not have the physical device (Intuos series) to test with.

I'll explain it again by refering back to the code to see if I can
make it clear or not. The code I am going to refer to is under the
Linus tree at git.kernel.org.


You are right. The tablet buttons can go with one of those other
BTN_TOOL_s _if_ they do not define the same event types (BTN_s) as the
tablet buttons.

The new Bamboo MT code sends both BTN_LEFT and BTN_RIGHT events for
Tablet Buttons (refer to line 905 and 908 of wacom_wac.c). However,
BTN_LEFT and BTN_RIGHT are also sent by BTN_TOOL_MOUSE/LENS tool
(refer to wacom_wac.c line 622 to 665).

If we remove BTN_TOOL_FINGER without a BTN_TOOL-something to replace
it, the two LEFT and RIGHT buttons will have a hard time to tell the
user land if they are from the MOUSE/LENS or the Tablet Buttons. The
worst case could be the LEFT/RIGHT sent later overwrites the earlier
ones.

We could do some guesswork in the user land to figure out which
LEFT/RIGHT belongs to which BTN_TOOL_ if the above scenario does not
happen. But, it would be much cheaper and more reliable if we can tell
the user land where those LEFT and RIGHT come from. This is the whole
purpose of the kernel driver, isn't it?

Ping
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Add BTN_TOOL_BUTTONS to input.h, Ping Cheng, (Thu Nov 18, 5:25 pm)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Dmitry Torokhov, (Mon Nov 22, 12:55 am)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Ping Cheng, (Tue Nov 23, 10:40 am)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Dmitry Torokhov, (Tue Nov 23, 3:24 pm)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Ping Cheng, (Tue Nov 23, 5:12 pm)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Dmitry Torokhov, (Tue Nov 23, 5:38 pm)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Ping Cheng, (Tue Nov 23, 5:51 pm)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Ping Cheng, (Tue Nov 23, 6:10 pm)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Dmitry Torokhov, (Tue Nov 23, 7:44 pm)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Ping Cheng, (Wed Nov 24, 10:46 am)
Re: [PATCH] Add BTN_TOOL_BUTTONS to input.h, Dmitry Torokhov, (Wed Nov 24, 1:16 pm)