diff options
-rw-r--r-- | ps2comm.c | 7 | ||||
-rw-r--r-- | ps2comm.h | 1 |
2 files changed, 7 insertions, 1 deletions
@@ -438,7 +438,9 @@ PrintIdent(const synapticshw_t *synhw) if (SYN_CAP_MULTI_BUTTON_NO(*synhw)) xf86Msg(X_PROBED, " -> %d multi buttons, i.e. besides standard buttons\n", (int)(SYN_CAP_MULTI_BUTTON_NO(*synhw))); - else if (SYN_CAP_FOUR_BUTTON(*synhw)) + if (SYN_CAP_MIDDLE_BUTTON(*synhw)) + xf86Msg(X_PROBED, " -> middle button\n"); + if (SYN_CAP_FOUR_BUTTON(*synhw)) xf86Msg(X_PROBED, " -> four buttons\n"); if (SYN_CAP_MULTIFINGER(*synhw)) xf86Msg(X_PROBED, " -> multifinger detection\n"); @@ -662,6 +664,9 @@ PS2ReadHwState(LocalDevicePtr local, synapticshw_t *synhw, hw->right = (buf[0] & 0x02) ? 1 : 0; if (SYN_CAP_EXTENDED(*synhw)) { + if (SYN_CAP_MIDDLE_BUTTON(*synhw)) { + hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; + } if (SYN_CAP_FOUR_BUTTON(*synhw)) { hw->up = ((buf[3] & 0x01)) ? 1 : 0; if (hw->left) @@ -14,6 +14,7 @@ /* synaptics model ID bits */ #define SYN_MODEL_ROT180(synhw) ((synhw).model_id & (1 << 23)) #define SYN_MODEL_PORTRAIT(synhw) ((synhw).model_id & (1 << 22)) +#define SYN_CAP_MIDDLE_BUTTON(synhw) ((synhw).model_id & (1 << 18)) #define SYN_MODEL_SENSOR(synhw) (((synhw).model_id >> 16) & 0x3f) #define SYN_MODEL_HARDWARE(synhw) (((synhw).model_id >> 9) & 0x7f) #define SYN_MODEL_NEWABS(synhw) ((synhw).model_id & (1 << 7)) |