aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2019-08-25 23:28:19 +0100
committerSean Young <sean@mess.org>2019-08-25 23:36:47 +0100
commitd3db9378041421e162913c38fa5713ea058beb49 (patch)
tree4986c6ef241c5df224ca6d07b998a994fe6c55a2
parente575167f480263806049348defbdba5071a9f288 (diff)
fixeskeymap
-rw-r--r--utils/common/keymap.c5
-rw-r--r--utils/ir-ctl/ir-ctl.c2
-rw-r--r--utils/keytable/rc_keymap.5.in4
3 files changed, 7 insertions, 4 deletions
diff --git a/utils/common/keymap.c b/utils/common/keymap.c
index 3853301e..c704c8d9 100644
--- a/utils/common/keymap.c
+++ b/utils/common/keymap.c
@@ -271,6 +271,7 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot
perror("parse_toml_protocol");
return ENOMEM;
}
+ *keymap = map;
raw = toml_raw_in(proot, "protocol");
if (!raw) {
@@ -284,6 +285,8 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot
}
map->protocol = strdup(p);
+ if (!strcmp(p, "raw"))
+ have_raw_protocol = true;
raw = toml_raw_in(proot, "variant");
if (raw) {
@@ -381,8 +384,6 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot
map->scancode = se;
}
- *keymap = map;
-
return 0;
}
diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c
index 0bb5c135..b605a0c3 100644
--- a/utils/ir-ctl/ir-ctl.c
+++ b/utils/ir-ctl/ir-ctl.c
@@ -135,6 +135,7 @@ static const char args_doc[] = N_(
"--receive [save to file]\n"
"--send [file to send]\n"
"--scancode [scancode to send]\n"
+ "--keycode [keycode to send]\n"
"[to set lirc option]");
static const char doc[] = N_(
@@ -600,6 +601,7 @@ static struct file* convert_keycode(struct keymap *map, const char *keycode)
memcpy(s->buf, re->raw, s->len * sizeof(int));
s->is_scancode = false;
s->is_keycode = false;
+ s->carrier = 0;
s->next = NULL;
return s;
diff --git a/utils/keytable/rc_keymap.5.in b/utils/keytable/rc_keymap.5.in
index d5de657a..00599755 100644
--- a/utils/keytable/rc_keymap.5.in
+++ b/utils/keytable/rc_keymap.5.in
@@ -4,7 +4,7 @@ rc_keymap \- toml file describing remote control keymap
.SH DESCRIPTION
An rc_keymap describes a remote control. It list the protocols used, and the
mapping from decoded IR to linux input events. This file is used by
-ir\-keytable(1).
+ir\-keytable(1) for IR decoding, and by ir-ctl(1) for sending IR.
.PP
The file format is toml. Since a remote control can use multiple protocols,
the top level is an array of protocols. The vast majority of remotes only use
@@ -308,7 +308,7 @@ License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH SEE ALSO
-ir\-keytable(1).
+ir\-keytable(1) and ir\-ctl(1)
.PP
https://lwn.net/Articles/759188/
.PP

Privacy Policy