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

Bug#596547: keyboard unusable



On Sun, Sep 12, 2010 at 18:33:51 +0200, Julien Cristau wrote:

> Anton, do you have an idea how to fix this (or anyone else, for that
> matter)?  We need to parse the xorg.conf keywords and option names
> case-insensitively, but the option values themselves are case-sensitive.
> 
So an obvious, if ugly, solution would be the following...

Index: debian/keyboard-configuration.config
===================================================================
--- debian/keyboard-configuration.config	(revision 64697)
+++ debian/keyboard-configuration.config	(working copy)
@@ -791,21 +791,20 @@
 then
     awk_expr='
 {
-    $0 = tolower($0);
     sub("#.*","")
     xkb = "";
 }
 
-/^[ \t]*section[ \t]+"inputdevice"/,/^[ \t]*endsection/ {
-    if ($1 == "option") {
-	if ($2 == "\"xkbmodel\"") {
+/^[ \t]*[sS][eE][cC][tT][iI][oO][nN][ \t]+"[iI][nN][pP][uU][tT][dD][eE][vV][iI][cC][eE]"/,/^[ \t]*[eE][nN][dD][sS][eE][cC][tT][iI][oO][nN]/ {
+    if (tolower($1) == "option") {
+	if (tolower($2) == "\"xkbmodel\"") {
 	    xkb = "XKBMODEL";
-	} else if ($2 == "\"xkblayout\"") {
+	} else if (tolower($2) == "\"xkblayout\"") {
 	    xkb = "XKBLAYOUT";
 	    print "layout_priority=medium";
-	} else if ($2 == "\"xkbvariant\"") {
+	} else if (tolower($2) == "\"xkbvariant\"") {
 	    xkb = "XKBVARIANT";
-	} else if ($2 == "\"xkboptions\"") {
+	} else if (tolower($2) == "\"xkboptions\"") {
 	    xkb = "XKBOPTIONS"; 
 	}
 	$1 = "";

That seems to do the right thing from some quick tests.

Cheers,
Julien

Attachment: signature.asc
Description: Digital signature


Reply to: