summaryrefslogtreecommitdiff
path: root/rcm-server-evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'rcm-server-evdev.c')
-rw-r--r--rcm-server-evdev.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/rcm-server-evdev.c b/rcm-server-evdev.c
index 9444b7f..3b76482 100644
--- a/rcm-server-evdev.c
+++ b/rcm-server-evdev.c
@@ -220,14 +220,24 @@ evdev_read(sd_event_source *s, int fd, uint32_t revents, void *userdata)
}
do {
+ char buf[100];
+
r = libevdev_next_event(device->evdev_dev, LIBEVDEV_READ_FLAG_NORMAL, &ev);
if (r != LIBEVDEV_READ_STATUS_SUCCESS)
continue;
- printf("Event: %s %s %u (0x%08x)\n",
- libevdev_event_type_get_name(ev.type),
- libevdev_event_code_get_name(ev.type, ev.code),
- ev.value, ev.value);
+ snprintf(buf, sizeof(buf), "Event: %s %s %u (0x%08x)\n",
+ libevdev_event_type_get_name(ev.type),
+ libevdev_event_code_get_name(ev.type, ev.code),
+ ev.value, ev.value);
+
+ sd_bus_emit_signal(device->mgr->bus,
+ device->path,
+ "org.gnome.RemoteControlManager.Device",
+ "Event",
+ "s", buf);
+
+ printf(buf);
switch (ev.type) {
case EV_KEY: