aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-02-13 16:16:50 +0100
committerLouis Burda <quent.burda@gmail.com>2023-02-13 16:17:00 +0100
commit5c5637ced37fc3179a7993b17a3361ff4d85472e (patch)
tree0292086f1e09bc362a4d2b6605a15d94bece46b1 /src
parent085d62c5a4c9cf37ce9de6bdbb4643e3a680450f (diff)
downloadsxkbd-5c5637ced37fc3179a7993b17a3361ff4d85472e.tar.gz
sxkbd-5c5637ced37fc3179a7993b17a3361ff4d85472e.zip
Send key report on active modifier change
Diffstat (limited to 'src')
-rw-r--r--src/hid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hid.c b/src/hid.c
index e87310f..a6be20b 100644
--- a/src/hid.c
+++ b/src/hid.c
@@ -367,7 +367,8 @@ bool
update_keyboard_report(struct hid_keyboard_report *new,
struct hid_keyboard_report *old)
{
- return memcmp(new->codes, old->codes, HID_REPORT_CODES);
+ return new->mods != old->mods
+ || memcmp(new->codes, old->codes, HID_REPORT_CODES);
}
bool