diff options
-rwxr-xr-x | hid/genmap.py | 2 | ||||
-rw-r--r-- | hid/src/keymap.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/hid/genmap.py b/hid/genmap.py index cb8f3ce5..75a31624 100755 --- a/hid/genmap.py +++ b/hid/genmap.py @@ -25,7 +25,7 @@ def main() -> None: }, kvmd_yaml_file, indent=4, default_flow_style=False) 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("#pragma once\n\n#include <HID-Project.h>\n\n#include \"inline.h\"\n\n\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)) diff --git a/hid/src/keymap.h b/hid/src/keymap.h index 8066be91..c2302601 100644 --- a/hid/src/keymap.h +++ b/hid/src/keymap.h @@ -1,3 +1,5 @@ +#pragma once + #include <HID-Project.h> #include "inline.h" |