Sort keys by symbol name. Easier to debug.
authorThibaut Girka <thib@sitedethib.com>
Thu, 21 Jul 2011 18:28:16 +0200
changeset 13 9a705eabfa7d
parent 12 d83eef518a33
child 14 fdebd4e61306
Sort keys by symbol name. Easier to debug.
scripts/make_keyboard_geom.py
--- a/scripts/make_keyboard_geom.py	Thu Jul 21 17:49:33 2011 +0200
+++ b/scripts/make_keyboard_geom.py	Thu Jul 21 18:28:16 2011 +0200
@@ -29,7 +29,7 @@
     with open(out_file, 'w') as file:
         file.write('#include "keyboard-geom.h"\n\n')
         file.write('TouchkbdKeyGeom keys_geom[%d] = {' % len(keys))
-        content = ',\n    '.join(key for key in keys.values())
+        content = ',\n    '.join(key for code, key in sorted(keys.items()))
         file.write(content)
         file.write('};\n\n')
         file.write('TouchkbdKeyboardGeom keyboard_geom = {%d, %d, %d, keys_geom};\n' % (width, height, len(keys)))