[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xkb support for HP laptop



(courtesy cc please, I'm not on debian-x, thanks)

Hi debian-x,

I'm trying to add support for the special keys on my HP nc4010 laptop using 
xkb. I have patched the runtime files on my system and checking with xev now 
some of the keys have the right symbols and some don't. The patch is attached 
and in XF86Config-4 I have,

 Section "InputDevice"
         Identifier      "Generic Keyboard"
         Driver          "keyboard"
         Option          "CoreKeyboard"
         Option          "XkbRules"      "xfree86"
         Option          "XkbModel"      "hpnc40x0"
 EndSection

The audio keys are working but the others aren't, output from xev attached.

Any idea why it's not working?
Did I miss something?
Can you change thing like this at runtime or does it need to be part of the 
build for some reason?

Thanks,

-- 
Matt Taggart
taggart@debian.org

KeyPress event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 38596, (87,88), root:(512,384),
    state 0x0, keycode 146 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 38918, (87,88), root:(512,384),
    state 0x0, keycode 146 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyPress event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 49685, (87,88), root:(512,384),
    state 0x0, keycode 159 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 50168, (87,88), root:(512,384),
    state 0x0, keycode 159 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyPress event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 55630, (87,88), root:(512,384),
    state 0x0, keycode 160 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 56008, (87,88), root:(512,384),
    state 0x0, keycode 160 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyPress event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 57990, (87,88), root:(512,384),
    state 0x0, keycode 174 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 57997, (87,88), root:(512,384),
    state 0x0, keycode 174 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyPress event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 59998, (87,88), root:(512,384),
    state 0x0, keycode 176 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 22, synthetic NO, window 0x800001,
    root 0x40, subw 0x0, time 60005, (87,88), root:(512,384),
    state 0x0, keycode 176 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:  ""
--- xkb/rules/xfree86.orig	2005-04-16 01:09:05.000000000 -0700
+++ xkb/rules/xfree86	2005-04-16 01:11:06.000000000 -0700
@@ -105,6 +105,7 @@
               ennyah_dkb1008 \
               hpi6 hp2501 hp2505 hp5181 hpxe3gc hpxe3gf hpxe4xxx hpzt11xx \
               hp500fa hp5xx \
+              hpnc40x0 \
               honeywell_euroboard \
               rapidaccess rapidaccess2 rapidaccess2a \
               ltcd logicdit logicdp logicdpa logicdpa2 logicdo logicfn \
--- xkb/rules/xfree86.lst.orig	2005-04-16 01:10:00.000000000 -0700
+++ xkb/rules/xfree86.lst	2005-04-16 01:10:57.000000000 -0700
@@ -56,6 +56,7 @@
   hpzt11xx	Hewlett-Packard Pavilion ZT11xx
   hp500fa	Hewlett-Packard Omnibook 500 FA
   hp5xx		Hewlett-Packard Omnibook 5xx
+  hpnc40x0	Hewlett-Packard nc40x0
   honeywell_euroboard Honeywell Euroboard
   rapidaccess	IBM Rapid Access
   rapidaccess2	IBM Rapid Access II
--- xkb/rules/xfree86.xml.orig	2005-04-16 14:11:56.000000000 -0700
+++ xkb/rules/xfree86.xml	2005-04-16 01:46:16.000000000 -0700
@@ -324,6 +324,12 @@
     </model>
     <model>
       <configItem>
+        <name>hpnc40x0</name>
+        <description>Hewlett-Packard nc40x0</description>
+      </configItem>
+    </model>
+    <model>
+      <configItem>
         <name>honeywell_euroboard</name>
         <description>Honeywell Euroboard</description>
       </configItem>
--- xkb/symbols/inet.orig	2005-04-15 21:49:49.000000000 -0700
+++ xkb/symbols/inet	2005-04-16 14:36:15.000000000 -0700
@@ -780,6 +780,21 @@
     key <I30>	{	[ XF86AudioRaiseVolume	]	};
 };
 
+partial alphanumeric_keys
+xkb_symbols "hpnc40x0" {
+
+    // Describes the buttons on HP Compaq nc40x0 laptop
+    // The Linux kernel sees these keys but you may need to install a
+    // keymap or use setkeycodes to associate the keycodes to keys
+
+    name[Group1]= "Hewlett-Packard nc40x0";
+    key <I14>	{	[ XF86Launch1		]	};
+    key <I15>	{	[ XF86Launch2		]	};
+    key <I18>	{	[ XF86Away		]	};
+    key <I20>	{	[ XF86AudioMute		]	};
+    key <I2E>	{	[ XF86AudioRaiseVolume	]	};
+    key <I30>	{	[ XF86AudioLowerVolume	]	};
+};
 
 // Honeywell
 
--- xkb/symbols.dir.orig	2005-04-16 14:15:28.000000000 -0700
+++ xkb/symbols.dir	2005-04-16 01:15:13.000000000 -0700
@@ -277,6 +277,7 @@
 --p----- a------- inet(hpxe4xxx)
 --p----- a------- inet(hp500fa)
 --p----- a------- inet(hp5xx)
+--p----- a------- inet(hpnc40x0)
 --p----- a------- inet(honeywell_euroboard)
 --p----- a------- inet(rapidaccess)
 --p----- a------- inet(rapidaccess2)

Reply to: