summaryrefslogtreecommitdiff
path: root/rcm-server-keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'rcm-server-keymap.c')
-rw-r--r--rcm-server-keymap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/rcm-server-keymap.c b/rcm-server-keymap.c
index 39b4440..af72045 100644
--- a/rcm-server-keymap.c
+++ b/rcm-server-keymap.c
@@ -233,8 +233,12 @@ keymap_parse(FILE *fp, char **line, size_t *buf_size, struct keymap *keymap,
}
} else if (!strcasecmp(p, "Button")) {
- if (keymap)
- keymap->layout[layout_count] = &keymap->keycodes[1];
+ if (keymap) {
+ if (!strcasecmp(tmp, "Blank"))
+ keymap->layout[layout_count] = NULL;
+ else
+ keymap->layout[layout_count] = &keymap->keycodes[1];
+ }
layout_count++;
} else {
@@ -270,7 +274,8 @@ keymap_parse(FILE *fp, char **line, size_t *buf_size, struct keymap *keymap,
}
if (rows * cols != layout_count) {
- fprintf(stderr, "Layout does not match rows x cols\n");
+ fprintf(stderr, "Layout (%u) does not match rows x cols (%ux%u)\n",
+ layout_count, rows, cols);
return -EINVAL;
}