[PATCH] Add input.keys to button devices with EV_KEY defined
Matthew Garrett
mjg59 at srcf.ucam.org
Mon Oct 20 08:05:38 PDT 2008
X will only bind evdev to event devices that declare input.keys in the
capabilities list. We should do that even if the device only has a
single key.
Only in hal-0.5.12: hal-add-keys-to-buttons.patch
diff -ur hal-0.5.12.clean/hald/linux/device.c hal-0.5.12/hald/linux/device.c
--- hal-0.5.12.clean/hald/linux/device.c 2008-10-13 12:15:34.000000000 +0100
+++ hal-0.5.12/hald/linux/device.c 2008-10-20 15:53:11.000000000 +0100
@@ -205,6 +205,8 @@
} else if (test_bit (KEY_SUSPEND, bitmask)) {
hal_device_property_set_string (d, "button.type", "hibernate");
}
+ if (input_test_keys (bitmask))
+ hal_device_add_capability (d, "input.keys");
} else {
gboolean is_keyboard = input_test_keyboard (bitmask);
gboolean is_keypad = input_test_keypad (bitmask);
--
Matthew Garrett | mjg59 at srcf.ucam.org
More information about the hal
mailing list