@@ -384,13 +384,6 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot
return EINVAL;
}
- scancodes = toml_table_in(proot, "scancodes");
- if (!scancodes) {
- if (verbose)
- fprintf(stderr, _("%s: no [protocols.scancodes] section\n"), fname);
- return 0;
- }
-
for (i = 0; (key = toml_key_in(proot, i)) != NULL; i++) {
int64_t value;
@@ -408,6 +401,13 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot
}
}
+ scancodes = toml_table_in(proot, "scancodes");
+ if (!scancodes) {
+ if (verbose)
+ fprintf(stderr, _("%s: no [protocols.scancodes] section\n"), fname);
+ return 0;
+ }
+
struct scancode_entry **next = &map->scancode;
i = 0;
Currently a protocol without scancodes does not get its parameters parsed. Signed-off-by: Sean Young <sean@mess.org> --- utils/common/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)