[OpenBIOS] r822 - cpu/x86/pc/olpc
svn at openbios.org
svn at openbios.org
Fri Apr 18 10:20:31 CEST 2008
Author: wmb
Date: 2008-04-18 10:20:31 +0200 (Fri, 18 Apr 2008)
New Revision: 822
Modified:
cpu/x86/pc/olpc/parsexkb.py
Log:
Fixed to handle variants of the XKB form as in the 2008-04-17 version of http://wiki.laptop.org/go/OLPC_Brasil_Keyboard
Modified: cpu/x86/pc/olpc/parsexkb.py
===================================================================
--- cpu/x86/pc/olpc/parsexkb.py 2008-03-13 07:58:09 UTC (rev 821)
+++ cpu/x86/pc/olpc/parsexkb.py 2008-04-18 08:20:31 UTC (rev 822)
@@ -24,6 +24,7 @@
keys = 128*[0]
modifiers = 128*[0]
+# Map from xkb key names to scanset 1 "make" codes
keynames = {
'AB01':44,
'AB02':45,
@@ -36,6 +37,7 @@
'AB09':52,
'AB10':53,
'AB11':115,
+'I219':115,
'AC01':30,
'AC02':31,
'AC03':32,
@@ -174,15 +176,16 @@
def collect_line(line):
global seenlines
try:
- s = split("\W+",sub("\t|{|}|\[|]|\,|<|>|;", "", line))
+ s = split("\W+",sub("\t|{|}|\[|]|\,|<|>|;", " ", line))
except:
return
- if s[1] != 'key':
- return
+ if s[1] == 'key':
+ seenlines[s[2]] = s[3:6]
+ else:
+ if s[0] == 'key':
+ seenlines[s[1]] = s[2:5]
- seenlines[s[2]] = s[3:6]
-
def process_keys():
global seenlines
More information about the OpenBIOS
mailing list