Input: add INPUT_PROP_POINTING_STICK property
It is useful for userspace to know that there not dealing with a regular mouse but rather with a pointing stick (e.g. a trackpoint) so that userspace can e.g. automatically enable middle button scrollwheel emulation. It is impossible to tell the difference from the evdev info without resorting to putting a list of device / driver names in userspace, this is undesirable. Add a property which allows userspace to see if a device is a pointing stick, and set it on all the pointing stick drivers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:

committed by
Dmitry Torokhov

parent
271329b3c7
commit
7611392fe8
@@ -1614,6 +1614,9 @@ int elantech_init(struct psmouse *psmouse)
|
||||
tp_dev->keybit[BIT_WORD(BTN_LEFT)] =
|
||||
BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) |
|
||||
BIT_MASK(BTN_RIGHT);
|
||||
|
||||
__set_bit(INPUT_PROP_POINTING_STICK, tp_dev->propbit);
|
||||
|
||||
error = input_register_device(etd->tp_dev);
|
||||
if (error < 0)
|
||||
goto init_fail_tp_reg;
|
||||
|
Reference in New Issue
Block a user