Index: xserver-xorg-input-evdev-2.6.99.901.dbg/src/evdev.c =================================================================== --- xserver-xorg-input-evdev-2.6.99.901.dbg.orig/src/evdev.c 2012-02-24 14:22:43.000000000 +0100 +++ xserver-xorg-input-evdev-2.6.99.901.dbg/src/evdev.c 2012-02-27 13:43:56.000000000 +0100 @@ -2149,8 +2149,15 @@ } } + if (has_keys) { + xf86IDrvMsg(pInfo, X_INFO, "Configuring as keyboard\n"); + pInfo->type_name = XI_KEYBOARD; + rc = 0; + } + if (has_rel_axes || has_abs_axes || num_buttons) { pInfo->flags |= XI86_SEND_DRAG_EVENTS; + pEvdev->flags &= ~EVDEV_KEYBOARD_EVENTS; /* Cannot be keyboard *and* mouse */ if (pEvdev->flags & EVDEV_TOUCHPAD) { xf86IDrvMsg(pInfo, X_INFO, "Configuring as touchpad\n"); pInfo->type_name = XI_TOUCHPAD; @@ -2169,14 +2176,8 @@ rc = 0; } - if (has_keys) { - xf86IDrvMsg(pInfo, X_INFO, "Configuring as keyboard\n"); - pInfo->type_name = XI_KEYBOARD; - rc = 0; - } - if (has_scroll && - (has_rel_axes || has_abs_axes || num_buttons || has_keys)) + (has_rel_axes || has_abs_axes || num_buttons)) { xf86IDrvMsg(pInfo, X_INFO, "Adding scrollwheel support\n"); pEvdev->flags |= EVDEV_BUTTON_EVENTS;