From bbff45cb2d5d8e2e1b2f9fb91c55b224c4a60455 Mon Sep 17 00:00:00 2001 From: "mazda@chromium.org" Date: Thu, 21 Jul 2011 08:03:20 +0000 Subject: 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 --- tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') 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 """ GRD_END = r' ' 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) -- cgit v1.1