device->classes |= INPUT_DEVICE_CLASS_TOUCH | INPUT_DEVICE_CLASS_TOUCH_MT;
}
// Is this an old style single-touch driver?
- } else if (test_bit(BTN_TOUCH, device->keyBitmask)
+ } else if ((test_bit(BTN_TOUCH, device->keyBitmask) || test_bit(BTN_LEFT, device->keyBitmask))
&& test_bit(ABS_X, device->absBitmask)
&& test_bit(ABS_Y, device->absBitmask)) {
device->classes |= INPUT_DEVICE_CLASS_TOUCH;
}
void TouchButtonAccumulator::configure(InputDevice* device) {
- mHaveBtnTouch = device->hasKey(BTN_TOUCH);
+ mHaveBtnTouch = device->hasKey(BTN_TOUCH) || device->hasKey(BTN_LEFT);
mHaveStylus = device->hasKey(BTN_TOOL_PEN)
|| device->hasKey(BTN_TOOL_RUBBER)
|| device->hasKey(BTN_TOOL_BRUSH)
}
void TouchButtonAccumulator::reset(InputDevice* device) {
- mBtnTouch = device->isKeyPressed(BTN_TOUCH);
+ mBtnTouch = device->isKeyPressed(BTN_TOUCH) || device->isKeyPressed(BTN_LEFT);
mBtnStylus = device->isKeyPressed(BTN_STYLUS);
mBtnStylus2 = device->isKeyPressed(BTN_STYLUS);
mBtnToolFinger = device->isKeyPressed(BTN_TOOL_FINGER);
if (rawEvent->type == EV_KEY) {
switch (rawEvent->code) {
case BTN_TOUCH:
+ case BTN_LEFT:
mBtnTouch = rawEvent->value;
break;
case BTN_STYLUS: