summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Osterlund <petero2@telia.com>2003-07-13 20:42:19 +0200
committerPeter Osterlund <petero2@telia.com>2006-04-09 04:01:01 +0200
commitffc6e06ee1a09c19b77551d7afa99236fe00a548 (patch)
treedff792cf909a735fc087417163a7d2568e6c9ccd
parent183d5e9a379ed43a3322c539393a6cd22b6d9f63 (diff)
Made horizontal wheel replacement buttons work. (From
Hartwig Felger.) For 2.5.x, a kernel patch is also needed.
-rw-r--r--synaptics.c18
-rw-r--r--synaptics.h2
2 files changed, 16 insertions, 4 deletions
diff --git a/synaptics.c b/synaptics.c
index 07cd5d8..61d8f26 100644
--- a/synaptics.c
+++ b/synaptics.c
@@ -1,4 +1,7 @@
/*
+ * 2003 Hartwig Felger <hgfelger@hgfelger.de>
+ * patch to make the horizontal-wheel-replacement-buttons work.
+ *
* 2002 Peter Osterlund <petero2@telia.com>
* patches for fast scrolling, palm detection, edge motion,
* horizontal scrolling
@@ -982,7 +985,9 @@ HandleState(LocalDevicePtr local, struct SynapticsHwState* hw)
(mid ? 0x02 : 0) |
(hw->right ? 0x04 : 0) |
(hw->up ? 0x08 : 0) |
- (hw->down ? 0x10 : 0));
+ (hw->down ? 0x10 : 0) |
+ (hw->cbLeft ? 0x20 : 0) |
+ (hw->cbRight ? 0x40 : 0));
/* Flags */
priv->finger_flag = finger;
@@ -1032,8 +1037,9 @@ HandleState(LocalDevicePtr local, struct SynapticsHwState* hw)
/*
* Handle auto repeat buttons
*/
- if ((hw->up || hw->down) && para->updown_button_scrolling) {
- priv->repeatButtons = buttons & 0x18;
+ if ((hw->up || hw->down || hw->cbLeft || hw->cbRight) &&
+ para->updown_button_scrolling) {
+ priv->repeatButtons = buttons & 0x78;
if (!priv->nextRepeat) {
priv->nextRepeat = hw->millis + 200;
}
@@ -1220,6 +1226,12 @@ SynapticsParseEventData(LocalDevicePtr local, SynapticsPrivatePtr priv,
case 0x116: /* BTN_BACK */
priv->hwState.down = (ev.value ? TRUE : FALSE);
break;
+ case 0x113: /* BTN_SIDE cb_l */
+ priv->hwState.cbLeft = (ev.value ? TRUE : FALSE);
+ break;
+ case 0x114: /* BTN_EXTRA cb_r */
+ priv->hwState.cbRight = (ev.value ? TRUE : FALSE);
+ break;
}
break;
case 0x03: /* ABS */
diff --git a/synaptics.h b/synaptics.h
index b1e9eba..a573a2f 100644
--- a/synaptics.h
+++ b/synaptics.h
@@ -112,7 +112,7 @@ typedef struct _SynapticsPrivateRec
unsigned long int identity; /* Identification */
Bool isSynaptics; /* Synaptics touchpad active */
Bool six_buttons; /* Use six button protocol */
-
+ /* only of interest if in raw mode */
Bool shm_config; /* True when shared memory area allocated */
OsTimerPtr timer; /* for up/down-button repeat, tap processing, etc */