[hal-info RFC] Rationalise Sony keyboard map

Matthew Garrett mjg59 at srcf.ucam.org
Tue Jun 3 04:50:02 PDT 2008


Sony are a bit more awkward. Older models have a quite different 
keyboard layout to modern ones. I've attempted to generate a list of 
what I /think/ are the appropriate model names for the older hardware, 
but I'd be interested to know if anyone has any others that should go in 
there.

diff --git a/fdi/information/10freedesktop/30-keymap-module-sony-laptop.fdi b/fdi/information/10freedesktop/30-keymap-module-sony-laptop.fdi
index e9924a0..bd765c0 100644
--- a/fdi/information/10freedesktop/30-keymap-module-sony-laptop.fdi
+++ b/fdi/information/10freedesktop/30-keymap-module-sony-laptop.fdi
@@ -6,39 +6,27 @@
          You can find the scancodes in the kernel source of the module (drivers/misc/sony-laptop.c) -->
     <match key="input.product" string="Sony Vaio Keys">
       <match key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" prefix="Sony">
-        <match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" string_outof="PCG-Z1RMP;PCG-Z1XMP;VGN-S1XP(GB);VGN-SZ3XWP_C;VGN-S5VP_B">
-          <append key="input.keymap.data" type="strlist">0x06:mute</append> <!-- Fn+F2 mute -->
-          <append key="input.keymap.data" type="strlist">0x07:volumedown</append> <!-- Fn+F3 mixer down -->
-          <append key="input.keymap.data" type="strlist">0x08:volumeup</append> <!-- Fn+F4 mixer up -->
-          <append key="input.keymap.data" type="strlist">0x09:brightnessdown</append> <!-- Fn+F5 brightness up -->
-          <append key="input.keymap.data" type="strlist">0x0a:brightnessup</append> <!-- Fn+F6 brightness down -->
-          <append key="input.keymap.data" type="strlist">0x0b:switchvideomode</append> <!-- Fn+F7 switch crt/lcd -->
-          <append key="input.keymap.data" type="strlist">0x10:suspend</append> <!-- Fn+F12 hibernate -->
-          <append key="info.capabilities" type="strlist">input.keymap</append>
-        </match>
-
-        <match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" contains_outof="VGN-FS790B;VGN-TZ11;VGN-TZ16;VGN-SZ71WN_C;VGN-N320E">
-          <append key="input.keymap.data" type="strlist">0x06:mute</append> <!-- Fn+F2 mute -->
-          <append key="input.keymap.data" type="strlist">0x07:volumedown</append> <!-- Fn+F3 mixer down -->
-          <append key="input.keymap.data" type="strlist">0x08:volumeup</append> <!-- Fn+F4 mixer up -->
-          <append key="input.keymap.data" type="strlist">0x09:brightnessdown</append> <!-- Fn+F5 brightness up -->
-          <append key="input.keymap.data" type="strlist">0x0a:brightnessup</append> <!-- Fn+F6 brightness down -->
-          <append key="input.keymap.data" type="strlist">0x0b:switchvideomode</append> <!-- Fn+F7 switch crt/lcd -->
-          <append key="input.keymap.data" type="strlist">0x0e:zoom</append> <!-- Fn+F10 zoom -->
-          <append key="input.keymap.data" type="strlist">0x10:suspend</append> <!-- Fn+F12 hibernate -->
-          <append key="info.capabilities" type="strlist">input.keymap</append>
-        </match>
-
-        <match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" contains_outof="VGN-FZ140E;VGN-FZ39VN">
-          <append key="input.keymap.data" type="strlist">0x06:mute</append> <!-- Fn+F2 mute -->
-          <append key="input.keymap.data" type="strlist">0x09:brightnessdown</append> <!-- Fn+F5 brightness down -->
-          <append key="input.keymap.data" type="strlist">0x0a:brightnessup</append> <!-- Fn+F6 brightness up -->
-          <append key="input.keymap.data" type="strlist">0x0b:switchvideomode</append> <!-- Fn+F7 switch crt/lcd -->
-          <append key="input.keymap.data" type="strlist">0x0e:zoom</append> <!-- Fn+F10 zoom -->
-          <append key="input.keymap.data" type="strlist">0x10:suspend</append> <!-- Fn+F12 hibernate -->
-          <append key="info.capabilities" type="strlist">input.keymap</append>
-        </match>
-      </match>
+        <append key="input.keymap.data" type="strlist">0x06:mute</append> <!-- Fn+F2 mute -->
+        <append key="input.keymap.data" type="strlist">0x07:volumedown</append> <!-- Fn+F3 mixer down -->
+        <append key="input.keymap.data" type="strlist">0x08:volumeup</append> <!-- Fn+F4 mixer up -->
+        <append key="input.keymap.data" type="strlist">0x09:brightnessdown</append> <!-- Fn+F5 brightness up -->
+        <append key="input.keymap.data" type="strlist">0x0a:brightnessup</append> <!-- Fn+F6 brightness down -->
+        <append key="input.keymap.data" type="strlist">0x0b:switchvideomode</append> <!-- Fn+F7 switch crt/lcd -->
+        <append key="input.keymap.data" type="strlist">0x10:suspend</append> <!-- Fn+F12 hibernate -->
+        <append key="input.keymap.data" type="strlist">0x0e:zoom</append> <!-- Fn+F10 zoom -->
+        <append key="input.keymap.data" type="strlist">0x10:suspend</append> <!-- Fn+F12 hibernate -->
+        <append key="info.capabilities" type="strlist">input.keymap</append>
+	<match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" contains_outof="PCG-C1;PCG-K25;PCG-F1;PCG-F2;PCG-F3;PCG-F4;PCG-F5;PCG-F6;PCG-FX;PCG-FRV;PCG-GR;PCG-TR;PCG-NV;PCG-Z">
+	  <!-- Older Vaios have a different keymap -->
+	  <remove key="input.keymap.data" type="strlist">0x06:mute</remove>
+	  <remove key="input.keymap.data" type="strlist">0x07:volumedown</remove>
+	  <remove key="input.keymap.data" type="strlist">0x08:volumeup</remove>
+	  <remove key="input.keymap.data" type="strlist">0x09:brightnessdown</remove>
+	  <remove key="input.keymap.data" type="strlist">0x0a:brightnessup</remove>
+          <append key="input.keymap.data" type="strlist">0x06:battery</append>
+          <append key="input.keymap.data" type="strlist">0x07:mute</append> 
+	</match>
+     </match>
     </match>
   </device>
 </deviceinfo>

-- 
Matthew Garrett | mjg59 at srcf.ucam.org


More information about the hal mailing list