diff --git a/src/wcmUSB.c b/src/wcmUSB.c index 0e781ac9..ff49b883 100644 --- a/src/wcmUSB.c +++ b/src/wcmUSB.c @@ -1173,18 +1173,25 @@ static int usbFilterEvent(WacomCommonPtr common, struct input_event *event) static int usbIdToType(int id) { int type = STYLUS_ID; + Bool is_aes = id & 1; if (!id) return 0; - /* The existing tool ids have the following patten: all pucks, except - * one, have the third byte set to zero; all erasers have the fourth - * bit set. The rest are styli. - */ - if (id & ERASER_BIT) - type = ERASER_ID; - else if (!(id & PUCK_BITS) || (id == PUCK_EXCEPTION)) - type = CURSOR_ID; + if (is_aes) { + /* Type information is not available from the ID for AES */ + return 0; + } + else { + /* The existing EMR tool ids have the following patten: all + * pucks, except one, have the third byte set to zero; all + * erasers have the fourth bit set. The rest are styli. + */ + if (id & ERASER_BIT) + type = ERASER_ID; + else if (!(id & PUCK_BITS) || (id == PUCK_EXCEPTION)) + type = CURSOR_ID; + } return type; }