diff options
author | vchtchetkine <vchtchetkine@google.com> | 2009-09-14 15:29:20 -0700 |
---|---|---|
committer | vchtchetkine <vchtchetkine@google.com> | 2009-09-21 08:37:25 -0700 |
commit | 9085a28c14f369d231dbae099a690689179f428a (patch) | |
tree | effe3ef60eeb2982f4c29361c7828174e5bd841b /gen-charmap.py | |
parent | 238b4b0ef1a01afa66ef267dae4a96401ad386db (diff) | |
download | external_qemu-9085a28c14f369d231dbae099a690689179f428a.zip external_qemu-9085a28c14f369d231dbae099a690689179f428a.tar.gz external_qemu-9085a28c14f369d231dbae099a690689179f428a.tar.bz2 |
Implementation for dynamic charmap option in emulator.
Created .kcm parser and added -charmap option to the emulator, so user
can specify keyboard layout for emulator session.
Diffstat (limited to 'gen-charmap.py')
-rw-r--r-- | gen-charmap.py | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/gen-charmap.py b/gen-charmap.py index 3c86350..418201b 100644 --- a/gen-charmap.py +++ b/gen-charmap.py @@ -56,8 +56,12 @@ specials = { 'COMMA': 'Comma', 'SEMICOLON': 'Semicolon', 'APOSTROPHE': 'Apostrophe', 'SPACE': 'Space', - 'ENTER': 'Enter', - 'TAB': 'Tab' + 'ENTER': 'Newline', + 'TAB': 'Tab', + 'STAR': 'Star', + 'POUND': 'Pound', + 'PLUS': 'Plus', + 'DEL': 'Del' } entries = [] @@ -86,31 +90,37 @@ def process_line(line,result): if not m: print "character expected in: " + line return -1 - base = quote(m.group(1)) + disp = quote(m.group(1)) line = m.group(2) m = match_char_or_hex(line) if not m: print "character expected in: " + line return -1 - caps = quote(m.group(1)) + number = quote(m.group(1)) line = m.group(2) m = match_char_or_hex(line) if not m: print "character expected in: " + line return -1 - fn = quote(m.group(1)) + base = quote(m.group(1)) line = m.group(2) m = match_char_or_hex(line) if not m: print "character expected in: " + line return -1 - caps_fn = quote(m.group(1)) + caps = quote(m.group(1)) line = m.group(2) m = match_char_or_hex(line) if not m: print "character expected in: " + line return -1 - number = quote(m.group(1)) + fn = quote(m.group(1)) + line = m.group(2) + m = match_char_or_hex(line) + if not m: + print "character expected in: " + line + return -1 + caps_fn = quote(m.group(1)) if specials.has_key(keycode): keycode = specials[keycode] |