fixed keymapping

This commit is contained in:
Devaev Maxim
2018-07-11 06:30:47 +00:00
parent 08a36a1fe0
commit f0c78e966e
5 changed files with 8 additions and 6 deletions

View File

@@ -26,10 +26,10 @@ def main() -> None:
with open("src/keymap.h", "w") as hid_header_file:
hid_header_file.write("#include <HID-Project.h>\n\n#include \"inline.h\"\n\n\n")
hid_header_file.write("INLINE uint8_t keymap(uint8_t code) {\n\tswitch(code) {\n")
hid_header_file.write("INLINE KeyboardKeycode keymap(uint8_t code) {\n\tswitch(code) {\n")
for (code, hid_key, _) in sorted(keymap, key=operator.itemgetter(1)):
hid_header_file.write("\t\tcase %d: return %s;\n" % (code, hid_key))
hid_header_file.write("\t\tdefault: return 0;\n\t}\n}")
hid_header_file.write("\t\tdefault: return 0;\n\t}\n}\n")
if __name__ == "__main__":