[Pommed-commits] [SCM] pommed - hotkeys handler for Apple laptops branch, master, updated. 1.35-7-g744c8f4

Julien BLACHE jb at jblache.org
Sat Feb 5 10:29:01 UTC 2011


The following commit has been merged in the master branch:
commit 744c8f47e2df1c46830c0d9c19bc374d40e3c996
Author: Julien BLACHE <jb at jblache.org>
Date:   Fri Feb 4 18:56:06 2011 +0100

    Add ADB product IDs for the ANSI and JIS keyboard variants
    
    Based on a report from Andrew Engelbrecht <naturaltwig at gmail.com>
    for the ANSI ADB keyboard.

diff --git a/ChangeLog b/ChangeLog
index 4cec7f1..121de1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ version 1.36:
 	- all: use LDLIBS instead of adding libraries to LDFLAGS.
 	- pommed: fix keyboard backlight fading on pmac.
 	- pommed: lock/unlock auto kbd backlight using up/down keys.
+	- pommed: add ADB product IDs for ANSI and JIS keyboard variants.
 
 version 1.35:
 	- pommed: fix crash if no fnmode sysfs node found.
diff --git a/pommed/evdev.c b/pommed/evdev.c
index d08da82..330655a 100644
--- a/pommed/evdev.c
+++ b/pommed/evdev.c
@@ -346,7 +346,9 @@ evdev_is_adb(unsigned short *id)
   if (id[ID_VENDOR] != 0x0001)
     return 0;
 
-  if (product == ADB_PRODUCT_ID_KEYBOARD)
+  if ((product == ADB_PRODUCT_ID_KEYBOARD_ANSI)
+      || (product == ADB_PRODUCT_ID_KEYBOARD_ISO)
+      || (product == ADB_PRODUCT_ID_KEYBOARD_JIS))
     {
       logdebug(" -> ADB keyboard\n");
 
diff --git a/pommed/evdev.h b/pommed/evdev.h
index 4e081c8..80437b6 100644
--- a/pommed/evdev.h
+++ b/pommed/evdev.h
@@ -8,9 +8,10 @@
 
 /****** ADB Devices ******/
 
-/* Keyboard as found on the PowerBook3,2 */
-#define ADB_PRODUCT_ID_KEYBOARD       0x22c4
-/* Special PowerBook buttons as found on the PowerBook3,2 */
+#define ADB_PRODUCT_ID_KEYBOARD_ANSI  0x22c3
+#define ADB_PRODUCT_ID_KEYBOARD_ISO   0x22c4
+#define ADB_PRODUCT_ID_KEYBOARD_JIS   0x22c5
+/* Special PowerBook buttons */
 #define ADB_PRODUCT_ID_PBBUTTONS      0x771f
 
 

-- 
pommed - hotkeys handler for Apple laptops



More information about the Pommed-commits mailing list