diff -rN -c xf86-input-wacom-0.10.11/src/wcmISDV4.c xf86-input-wacom-0.10.11-patched/src/wcmISDV4.c --- xf86-input-wacom-0.10.11/src/wcmISDV4.c 2011-05-03 16:48:44.887867748 -0400 +++ xf86-input-wacom-0.10.11-patched/src/wcmISDV4.c 2011-05-03 16:51:34.223868280 -0400 @@ -635,6 +635,32 @@ } } + /* handle TC1100 stylus buttons */ + if ((data[0] == 0xC1) && ((data[1] & 0xF0) == 0)) + { + DBG(2, priv, "isdv4Parse Tablet Button %s\n", + data[1] == 0x1 ? "rotate" : data[1] == 0x2 ? "journal" + : data[1] == 0x4 ? "keyboard" : "unknown" ); + + /* do not reset relative values here */ + ds = &common->wcmChannel[0].work; + + /* first send the tablet button press event */ + ds->proximity = 1; + ds->buttons = ((int)data[1]) << 29; + ds->pressure = common->wcmMaxZ; + ds->device_id = STYLUS_DEVICE_ID; + ds->device_type = STYLUS_ID; + wcmEvent(common, 0, ds); + + /* then immediately after send the release event */ + ds->buttons = 0; + ds->pressure = 0; + ds->proximity = 0; + wcmEvent(common, 0, ds); + return common->wcmPktLength; + } + /* Coordinate data bit check */ if (data[0] & CONTROL_BIT) /* control data */ return common->wcmPktLength;