From: Yaraslau Furman <yaro330@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: yaro330@gmail.com, "Filipe Laíns" <lains@riseup.net>,
"Jiri Kosina" <jikos@kernel.org>,
linux-input@vger.kernel.org (open list:HID LOGITECH DRIVERS),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] HID: logitech-dj: allow mice to use all types of reports
Date: Sun, 28 Jan 2024 23:49:06 +0200 [thread overview]
Message-ID: <20240128214906.60606-1-yaro330@gmail.com> (raw)
You can bind whatever action you want to the mouse's reprogrammable
buttons using Windows application. Allow Linux to receive those keycodes.
Signed-off-by: Yaraslau Furman <yaro330@gmail.com>
---
drivers/hid/hid-logitech-dj.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index e6a8b6d8eab7..5730be1aa41c 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -948,11 +948,12 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
HIDPP_DEVICE_TYPE_MASK;
workitem->quad_id_msb = hidpp_report->params[HIDPP_PARAM_EQUAD_MSB];
workitem->quad_id_lsb = hidpp_report->params[HIDPP_PARAM_EQUAD_LSB];
+ workitem->reports_supported |= STD_KEYBOARD | MULTIMEDIA |
+ POWER_KEYS | MEDIA_CENTER |
+ HIDPP;
+
switch (workitem->device_type) {
case REPORT_TYPE_KEYBOARD:
- workitem->reports_supported |= STD_KEYBOARD | MULTIMEDIA |
- POWER_KEYS | MEDIA_CENTER |
- HIDPP;
id = (workitem->quad_id_msb << 8) | workitem->quad_id_lsb;
for (i = 0; i < ARRAY_SIZE(kbd_builtin_touchpad_ids); i++) {
if (id == kbd_builtin_touchpad_ids[i]) {
@@ -965,9 +966,6 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
}
break;
case REPORT_TYPE_MOUSE:
- workitem->reports_supported |= STD_MOUSE | HIDPP;
- if (djrcv_dev->type == recvr_type_mouse_only)
- workitem->reports_supported |= MULTIMEDIA;
break;
}
}
--
2.43.0
next reply other threads:[~2024-01-28 21:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-28 21:49 Yaraslau Furman [this message]
2024-01-30 11:17 ` [PATCH v2] HID: logitech-dj: allow mice to report multimedia keycodes Yaraslau Furman
2024-02-22 10:18 ` Yaraslau Furman
2024-04-03 11:38 ` Jiri Kosina
2024-04-03 13:54 ` Hans de Goede
2024-04-03 15:05 ` Yaroslav Furman
2024-04-03 15:06 ` Yaroslav Furman
2024-04-03 15:38 ` Hans de Goede
2024-04-03 16:54 ` [PATCH v3] HID: logitech-dj: allow mice to use all types of reports Yaroslav Furman
2024-04-03 16:55 ` Hans de Goede
2024-04-03 17:30 ` Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240128214906.60606-1-yaro330@gmail.com \
--to=yaro330@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=lains@riseup.net \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.