From 62d5068d631fd655efe3ae4ad51fffe28e13e27a Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 5 Oct 2014 17:44:09 +0200 Subject: terminal/idev: don't remove consumed-mods from kbd-matches XKB consumed mods include modifiers that *didn't* affect the translation, but might affect it if used. This is very misleading, given that we are usually not interested in that information. Therefore, keep them in real mods to behave like X11 does. Maybe at some point, XKB introduces proper shortcut matching... Also make evcat display consumed modifiers so we can better debug those situations. --- src/libsystemd-terminal/evcat.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libsystemd-terminal/evcat.c') diff --git a/src/libsystemd-terminal/evcat.c b/src/libsystemd-terminal/evcat.c index 62556f6a2b..9e8a262b79 100644 --- a/src/libsystemd-terminal/evcat.c +++ b/src/libsystemd-terminal/evcat.c @@ -219,6 +219,13 @@ static void kdata_print(idev_data *data) { printf(" %-5s", (k->mods & IDEV_KBDMOD_LINUX) ? "LINUX" : ""); printf(" %-4s", (k->mods & IDEV_KBDMOD_CAPS) ? "CAPS" : ""); + /* Consumed modifiers */ + printf(" | %-5s", (k->consumed_mods & IDEV_KBDMOD_SHIFT) ? "SHIFT" : ""); + printf(" %-4s", (k->consumed_mods & IDEV_KBDMOD_CTRL) ? "CTRL" : ""); + printf(" %-3s", (k->consumed_mods & IDEV_KBDMOD_ALT) ? "ALT" : ""); + printf(" %-5s", (k->consumed_mods & IDEV_KBDMOD_LINUX) ? "LINUX" : ""); + printf(" %-4s", (k->consumed_mods & IDEV_KBDMOD_CAPS) ? "CAPS" : ""); + /* Resolved symbols */ printf(" |"); for (i = 0; i < k->n_syms; ++i) { -- cgit v1.2.3-54-g00ecf