[PATCH] Absolute mode event interface for synaptics touchpad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



gpm support for inspiron 4100.
Add abosulute mode to evdev driver for synaptics touchpad using event interface
from linux-2.6.0-test2
Add dead zones
Trackpoint not supported yet



Regards.
235a236,242
> #define EVDEV_ABS_MIN	1000
> #define EVDEV_ABS_DEADZ	300
> #define EVDEV_ABS_MIN_X (1300+EVDEV_ABS_DEADZ)
> #define EVDEV_ABS_MIN_Y (1200+EVDEV_ABS_DEADZ)
> #define EVDEV_ABS_MAX_X (5650-EVDEV_ABS_MIN_X-EVDEV_ABS_DEADZ)
> #define EVDEV_ABS_MAX_Y (4400-EVDEV_ABS_MIN_Y-EVDEV_ABS_DEADZ)
> /* evdev absolute mode for synaptic in linux-2.6.0-test2 */
240c247,257
<    if (thisevent.type == EV_REL) {
---
>    // printf("%d\t%d\t%d\t%d\t%d\n",thisevent.type,thisevent.code,thisevent.value,state->x,state->y);
>    if (thisevent.type == EV_ABS && thisevent.value > EVDEV_ABS_MIN) {
> 	thisevent.type-=EVDEV_ABS_DEADZ;
>       if (thisevent.code == ABS_X){
> 	 thisevent.value-=EVDEV_ABS_MIN_X;
> 	    state->x = (signed char) ((thisevent.value*win.ws_col)/EVDEV_ABS_MAX_X);
>       }else if (thisevent.code == ABS_Y){
> 	 thisevent.value-=EVDEV_ABS_MIN_Y;
> 	 state->y = (signed char) (win.ws_row-((thisevent.value*win.ws_row)/EVDEV_ABS_MAX_Y));
>       }
>    } else if (thisevent.type == EV_REL) {
2245c2262
<                         {0x00, 0x00, 0x00, 0x00} , 16, 16, 0, 0, NULL},
---
>                         {0x00, 0x00, 0x00, 0x00} , 16, 16, 0, 1, NULL},

Attachment: pgp00076.pgp
Description: PGP signature


[Index of Archives]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Gimp]     [Yosemite News]