summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py16
1 files changed, 2 insertions, 14 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 dd40249..18f3735 100755
--- a/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
+++ b/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
@@ -340,18 +340,6 @@ def GenerateCopyrightHeader():
return COPYRIGHT_HEADER_TEMPLATE % datetime.date.today().year
-def UniqueBehaviors(hotkey_data):
- """Retrieves a list of unique behaviors from |hotkey_data|."""
- behaviors = []
- added = set()
- for (behavior, _) in hotkey_data:
- if behavior in added:
- continue
- behaviors.append(behavior)
- added.add(behavior)
- return behaviors
-
-
def OutputJson(keyboard_glyph_data, hotkey_data, layouts, var_name, outfile):
"""Outputs the keyboard overlay data as a JSON file."""
print 'Generating: %s' % outfile
@@ -375,7 +363,7 @@ def OutputGrd(hotkey_data, outfile):
print 'Generating: %s' % outfile
desc = 'The text in the keyboard overlay to explain the shortcut.'
out = file(outfile, 'w')
- for behavior in UniqueBehaviors(hotkey_data):
+ for (behavior, _) in hotkey_data:
out.write(GRD_SNIPPET_TEMPLATE % (ToMessageName(behavior), desc, behavior))
@@ -383,7 +371,7 @@ def OutputCC(hotkey_data, outfile):
"""Outputs a snippet used for C++ file."""
print 'Generating: %s' % outfile
out = file(outfile, 'w')
- for behavior in UniqueBehaviors(hotkey_data):
+ for (behavior, _) in hotkey_data:
message_name = ToMessageName(behavior)
# Indent the line if message_name is longer than 45 characters, which means
# the second line in the generated code is longer than 80 characters.