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

Bug#535291: Modify debian-x11-keymap.fdi to cope with future hal changes



Package: xserver-xorg

Forwarded from https://bugs.launchpad.net/ubuntu/+source/hal/+bug/375618

"I have certain xkb configuration options in my /etc/default/console-setup . Most important of them for me are :

XKBLAYOUT="us,ru,ua"
XKBOPTIONS="grp:caps_toggle,grp_led:scroll"

I am testing Karmic packages on top of my Jaunty installation.

After upgrade of hal to 0.5.12~rc1+git20090510-0ubuntu2 , I noticed that my keyboard layouts and options are not configured into xorg server anymore. In Xorg.0.log I see xkb_layout configured as only "us". I can not use "ru" and "ua" layouts, and switch them by CapsLock.

Reverting to hal 0.5.12~rc1+git20090403-0ubuntu1 (from Jaunty) helped me to restore former proper behaviour (xkb layouts and options are taken from /etc/default/console-setup, shown in Xorg.0.log and act as they did before and as I liked).

Don't know for sure if this behaviour occured in git20090406.46dc48 versions of hal, as I did not restart my xorg server at these times."

The way to fix it was to modify the debian-x11-keymap.fdi to directly check for input.keys capability:

--- xorg-7.4+3ubuntu3/debian/local/debian-x11-keymap.fdi	2009-06-17 22:07:43.000000000 +0100
+++ xorg-7.4+3ubuntu4/debian/local/debian-x11-keymap.fdi	2009-06-30 22:15:23.000000000 +0100
@@ -1,10 +1,18 @@
 <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
 <deviceinfo version="0.2">
     <device>
-	<match key="input.xkb.layout" exists="true">
-	    <append key="info.callouts.add" type="strlist">debian-setup-keyboard</append>
-	</match>
-    </device>
+      <match key="info.capabilities" contains="input.keys">
+        <merge key="input.xkb.rules" type="string">base</merge>
+        <merge key="input.xkb.model" type="string">evdev</merge>
+
+	<!-- Provide a default -->
+        <merge key="input.xkb.layout" type="string">us</merge>
+        <merge key="input.xkb.variant" type="string" />
+
+	<!-- Read console-setup values for real layout -->
+	<append key="info.callouts.add" type="strlist">debian-setup-keyboard</append>
+      </match>
+   </device>
 </deviceinfo>

This should probably be applied to Debian as well, before the hal version in unstable drops 10-keymap.fdi and hal-setup-keymap.

t



Reply to: