diff options
author | Devaev Maxim <[email protected]> | 2018-08-03 00:53:34 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-08-03 00:53:34 +0300 |
commit | 4bacc04d2b178b0138364b2c8512fc85bf2125f2 (patch) | |
tree | 7f0a7b6df676447a3a4443c44f62cfde2829795f | |
parent | 12f504482c346ca0d23bb4a294bd7c0e1d657655 (diff) |
pragma once for keymap.h
-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" |