This three line patch adds support for middle mouse button on Synaptics touchpad (I have one of those on my HP Omnibook 6000). This particular model is identified by driver as: Synaptics Touchpad, model: 1 Firmware: 5.4 180 degree mounted touchpad Sensor: 27 new absolute packet format Touchpad has extended capability bits -> multifinger detection -> palm detection -> pass-through port input: SynPS/2 Synaptics TouchPad on isa0060/serio1 serio: Synaptics pass-through port at isa0060/serio1/input0 input: PS/2 Generic Mouse on synaptics-pt/serio0 It has two buttons below touchpad and three above. Following packets are received by kernel from device: left down packets: 81 00 00 c1 00 00 middle down packets: 80 00 00 c1 00 00 right down packets: 82 00 00 c2 00 00 up packets: 80 00 00 c0 00 00 diff -urw linux-2.6.5-vanilla/drivers/input/mouse/synaptics.c linux-2.6/drivers/input/mouse/synaptics.c --- linux-2.6.5-vanilla/drivers/input/mouse/synaptics.c 2004-04-10 13:21:10.000000000 +0200 +++ linux-2.6/drivers/input/mouse/synaptics.c 2004-04-10 13:10:49.000000000 +0200 @@ -470,6 +470,7 @@ ((buf[3] & 0x04) >> 2)); hw->left = (buf[0] & 0x01) ? 1 : 0; + hw->middle = (!(buf[0] & 0x03) && buf[3] & 0x01) ? 1 : 0; hw->right = (buf[0] & 0x02) ? 1 : 0; if (SYN_CAP_EXTENDED(priv->capabilities) && (SYN_CAP_FOUR_BUTTON(priv->capabilities))) { @@ -571,6 +572,7 @@ input_report_key(dev, BTN_TOOL_TRIPLETAP, num_fingers == 3); input_report_key(dev, BTN_LEFT, hw.left); + input_report_key(dev, BTN_MIDDLE, hw.middle); input_report_key(dev, BTN_RIGHT, hw.right); input_report_key(dev, BTN_FORWARD, hw.up); input_report_key(dev, BTN_BACK, hw.down); diff -urw linux-2.6.5-vanilla/drivers/input/mouse/synaptics.h linux-2.6/drivers/input/mouse/synaptics.h --- linux-2.6.5-vanilla/drivers/input/mouse/synaptics.h 2004-04-10 13:21:10.000000000 +0200 +++ linux-2.6/drivers/input/mouse/synaptics.h 2004-04-10 12:57:38.000000000 +0200 @@ -87,6 +87,7 @@ int z; int w; int left; + int middle; int right; int up; int down;