diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-09 22:25:01 -0500 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-09 23:17:27 -0500 |
commit | 4dba42555f123e68b81d3587c9ea55ecc0d40d84 (patch) | |
tree | ee51575fc6534741609123f0b8316a7bb5dc545b /swaymsg/main.c | |
parent | input_cmd_events: implement toggle (diff) | |
download | sway-4dba42555f123e68b81d3587c9ea55ecc0d40d84.tar.gz sway-4dba42555f123e68b81d3587c9ea55ecc0d40d84.tar.zst sway-4dba42555f123e68b81d3587c9ea55ecc0d40d84.zip |
get_inputs: add libinput send events mode
Add `libinput_send_events` to the IPC output for `get_inputs` to allow
scripting of mode changes.
Diffstat (limited to 'swaymsg/main.c')
-rw-r--r-- | swaymsg/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index f1bb5e3e..e5eee631 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -113,7 +113,7 @@ static const char *pretty_type_name(const char *name) { | |||
113 | } | 113 | } |
114 | 114 | ||
115 | static void pretty_print_input(json_object *i) { | 115 | static void pretty_print_input(json_object *i) { |
116 | json_object *id, *name, *type, *product, *vendor, *kbdlayout; | 116 | json_object *id, *name, *type, *product, *vendor, *kbdlayout, *events; |
117 | json_object_object_get_ex(i, "identifier", &id); | 117 | json_object_object_get_ex(i, "identifier", &id); |
118 | json_object_object_get_ex(i, "name", &name); | 118 | json_object_object_get_ex(i, "name", &name); |
119 | json_object_object_get_ex(i, "type", &type); | 119 | json_object_object_get_ex(i, "type", &type); |
@@ -139,6 +139,10 @@ static void pretty_print_input(json_object *i) { | |||
139 | json_object_get_string(kbdlayout)); | 139 | json_object_get_string(kbdlayout)); |
140 | } | 140 | } |
141 | 141 | ||
142 | if (json_object_object_get_ex(i, "libinput_send_events", &events)) { | ||
143 | printf(" Libinput Send Events: %s\n", json_object_get_string(events)); | ||
144 | } | ||
145 | |||
142 | printf("\n"); | 146 | printf("\n"); |
143 | } | 147 | } |
144 | 148 | ||