mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
pragma once for keymap.h
This commit is contained in:
parent
12f504482c
commit
4bacc04d2b
@ -25,7 +25,7 @@ def main() -> None:
|
|||||||
}, kvmd_yaml_file, indent=4, default_flow_style=False)
|
}, kvmd_yaml_file, indent=4, default_flow_style=False)
|
||||||
|
|
||||||
with open("src/keymap.h", "w") as hid_header_file:
|
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")
|
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)):
|
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\tcase %d: return %s;\n" % (code, hid_key))
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
#include <HID-Project.h>
|
#include <HID-Project.h>
|
||||||
|
|
||||||
#include "inline.h"
|
#include "inline.h"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user