diff options
-rw-r--r-- | src/libsystemd-terminal/evcat.c | 7 | ||||
-rw-r--r-- | src/libsystemd-terminal/idev.h | 2 |
2 files changed, 8 insertions, 1 deletions
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) { diff --git a/src/libsystemd-terminal/idev.h b/src/libsystemd-terminal/idev.h index ea79bb6ab6..c8c03f3d41 100644 --- a/src/libsystemd-terminal/idev.h +++ b/src/libsystemd-terminal/idev.h @@ -123,7 +123,7 @@ static inline bool idev_kbdmatch(idev_data_keyboard *kdata, return false; real = kdata->mods & ~kdata->consumed_mods & significant; - if (real != (mods & ~kdata->consumed_mods)) + if (real != mods) return false; return !memcmp(syms, kdata->keysyms, n_syms * sizeof(*syms)); |