summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-21 08:03:20 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-21 08:03:20 +0000
commitbbff45cb2d5d8e2e1b2f9fb91c55b224c4a60455 (patch)
tree3eb25ea4beba1bccc004b7f6e9dcb365f36642cb /tools
parent1a20b1a96e35a1a5c9fdd6b7d3fa405319c17dc1 (diff)
downloadchromium_src-bbff45cb2d5d8e2e1b2f9fb91c55b224c4a60455.zip
chromium_src-bbff45cb2d5d8e2e1b2f9fb91c55b224c4a60455.tar.gz
chromium_src-bbff45cb2d5d8e2e1b2f9fb91c55b224c4a60455.tar.bz2
Fix gen_keyboard_overlay_data.py not outputting AltGr.
Also modify the script to output the sorted lists of input method ID. BUG=none TEST=Checked the script generated correct output. Review URL: http://codereview.chromium.org/7471030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py b/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
index 4d7b250..c8c9265 100755
--- a/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
+++ b/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
@@ -61,7 +61,7 @@ GRD_START = """Escape to hide
</message>"""
GRD_END = r' </if>'
ALTGR_START = r"arrays are generated by 'gen_keyboard_overlay_data.py --altgr'"
-ALTGR_END = r'bool KeepRightAlt(const std::string& layout_name) {'
+ALTGR_END = r'class XkbLayoutSets {'
LABEL_MAP = {
'glyph_arrow_down': 'down',
@@ -524,8 +524,8 @@ def OutputAltGr(keyboard_glyph_data, outdir):
caps_lock_output.append(' "%s",' % input_method_id)
except KeyError:
pass
- snippet = ALTGR_TEMPLATE % ("\n".join(altgr_output),
- "\n".join(caps_lock_output))
+ snippet = ALTGR_TEMPLATE % ("\n".join(sorted(altgr_output)),
+ "\n".join(sorted(caps_lock_output)))
RewriteFile(ALTGR_START, ALTGR_END, ALTGR_OUTDIR, ALTGR_FILENAME, snippet,
outdir)