On Mon, Aug 07, 2006 at 05:30:23PM -0400, Zephaniah E. Hull wrote:
> To write xf86-input-evdev's abs support, I ended up with a touchpad that
> uses the kbtab driver, sadly, it needed a few tweaks to be usable.
> 
> We should report the touch event, actually needed to get accurate data.
> 
> We should not report a middle button that we don't _have_, it doesn't
> help anyone to do so.
> 
> And we should always send pressure data, even when we're generating
> BTN_LEFT from it.

I would even go as far as to say that we shouldn't generate BTN_LEFT at
all, and that it should be BTN_STYLUS that we generate for the on-pen
button instead of BTN_RIGHT.

evtouch should be able to handle that hopefully.

> Signed-off-by: "Zephaniah E. Hull" <[EMAIL PROTECTED]>
> 
> diff -ur linux-test/drivers/usb/input/kbtab.c 
> linux-2.6/drivers/usb/input/kbtab.c
> --- linux-test/drivers/usb/input/kbtab.c      2006-07-24 23:36:01.000000000 
> -0400
> +++ linux-2.6/drivers/usb/input/kbtab.c       2006-04-02 06:14:10.000000000 
> -0400
> @@ -76,12 +76,11 @@
>       input_report_abs(dev, ABS_X, kbtab->x);
>       input_report_abs(dev, ABS_Y, kbtab->y);
>  
> -     /*input_report_key(dev, BTN_TOUCH , data[0] & 0x01);*/
> +     input_report_key(dev, BTN_TOUCH , data[0] & 0x01);
>       input_report_key(dev, BTN_RIGHT, data[0] & 0x02);
>  
> -     if (-1 == kb_pressure_click) {
> -             input_report_abs(dev, ABS_PRESSURE, kbtab->pressure);
> -     } else {
> +     input_report_abs(dev, ABS_PRESSURE, kbtab->pressure);
> +     if (-1 != kb_pressure_click) {
>               input_report_key(dev, BTN_LEFT, (kbtab->pressure > 
> kb_pressure_click) ? 1 : 0);
>       };
>  
> @@ -155,7 +154,7 @@
>       input_dev->close = kbtab_close;
>  
>       input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC);
> -     input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | 
> BIT(BTN_MIDDLE);
> +     input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT);
>       input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH);
>       input_dev->mscbit[0] |= BIT(MSC_SERIAL);
>       input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0);
> 
> -- 
>         1024D/E65A7801 Zephaniah E. Hull <[EMAIL PROTECTED]>
>          92ED 94E4 B1E6 3624 226D  5727 4453 008B E65A 7801
>           CCs of replies from mailing lists are requested.
> 
> The story includes this array of huge rhymes-with-hell machines, all running
> screensavers, the power and SAN cables neatly run between them... and the
> disused tape-storage closet stuffed with old Sun boxen still humming quietly
> away.  - adb in ASR on rumours of a flawless SunOS to NT site cutover.



-- 
Vojtech Pavlik
Director SuSE Labs

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to