From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDF603603D9 for ; Sat, 4 Jul 2026 23:11:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783206673; cv=none; b=I1luUelXOoR2lI6qxU5Wbj9xnpwt2Mtq+ARnwqFP0QA3EjvSeXAxIhR+AMDUYS+Dm/xS+wgzHRWld04FsvUBvWc0RKU7x1k3Q4ijNHQtuV7UtpiUqFbZ/qx5VeSqJEa33BV9OTh6Zqs7k5MnHsbGs8wDGVmeOiynWgn/Ukn37Zs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783206673; c=relaxed/simple; bh=cjWpWUf9JVI8TCn7SGZYPnijJgSfbwyKKK9pYmm8U0c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rvAAJNR+qkitjWRgYcSIDfbCCF+9O2/Xc/W74uESacMgR73PjjGTn2xt39nEml3ka4Z6fkcWNhEi+jZ5Eg+YaBUCcGPLkgDD5gzs/bgTPEgBEFzawcewI00AFxjbZYaKIvJxK0z/cxHhn39Ej1AtQSa+b9AhPqdZ3AyrsBFX3zM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B8oeQeX3; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B8oeQeX3" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-475881b9a4bso1477873f8f.3 for ; Sat, 04 Jul 2026 16:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783206670; x=1783811470; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FtZSKFNiz07pIzEetGtrSPhdzPnXrxlvgbBRsebkWvE=; b=B8oeQeX32Kku4Rp9ciLN+LvRU7beUofEt90zwxhaMKXpjue4z7BOO0C9jxhcFyIB21 MSfsG+4uhR6CfFE+BbtSNf9Clky2VkJ7F118PSWLMzxCwqmimxRFtoGTKMa3FxSA1G2E ZVpCSnYS166qmnzuFR7WawVwXUuECPfc2NJ5rXSLDHhU5GDzQe1uDaqSxgWR09KU8O2Z 4Rw47t94wd/8U7S7uv9Cd5oxHXM2WxfHnsatI3/HpWQlO41gu1jGyc3Je00ITsg8MqTX IqGb4u3EI12/tcad0xymMYVoUIrwDfzOF8gMQbIg+wW5ucXQ4RJzoNJVegt+V9Vad03L gRDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783206670; x=1783811470; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=FtZSKFNiz07pIzEetGtrSPhdzPnXrxlvgbBRsebkWvE=; b=R8p5RLCOXRF7kMv2T00phC4E60kvB3pCbs3dPLA8DVTGfH7WEY/BelO+vRqUp9Fnao cEyAFFzfpkhWY+P4Wh6KgbzvnUUlTx3GzeyN7AqlQ2YZ4uxc6AJlb7tpegfS9mQSLOHs OsgUGhYL0fu2aEZa1l1pCRSvVcY+EqZzziJUMSktZneQSfKy9LYQ5+v2bwvfxl6j+uh5 hghn8bC2jyt1iUI9hLK8A5epXutAJMb0vMLYzFwqxm7wgLaWspZuC5lTfWGtnL5c5wgj KIgsWP1+vFJu0WUZSRP97Vr1bDXBheNgk0R05AzouqP5p4Fz7uTH/c9529Fldy+LSX81 VTlg== X-Forwarded-Encrypted: i=1; AHgh+RpWTWWFeCfuy7N4CKRPGld6gdWz0JKMFPGHBK4WVbUoFXeQ/SZXm2GYAkkdXzZUuEe9x94L5RwJhNhSqBE=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0uAo7i5xJ3ql0RHhPAFVB6G3wenrxJrDlfYo929HMXL16y5Dh v9tbQb8yfXCYLio0xqcYXEJWGk2PZnyqt1xX1KxtdlS219r2gBw7KA5q X-Gm-Gg: AfdE7ckgxkdoqCUQ1MD5jRs/6n9cg+OLSO1v4B4KufU8F1ZSMTfKHDUpvo68A4bbuq9 TgepDne04CIPlAJv228KdknTeMEHL0xhZ4dPmjLMKnUPyrHkUIKUziKIJbd2a0LcWSDd+Rslf7I Aba0TrPoItqpI+Y3nwZtL4R+GvjlsvnB1S6xPle/ovoe35WFpqHjCR8ue38iTSUWT2XKkRFhEE4 WdlI1lg+jZ42PIPTVvHVX27muKxe5oJIBv2ygxF225U8A13oDU7H9KzHNYfCB469Mfqlz6ZwT+c T0R2rjBuDXyKqYt/0FyokfIUZPCGnSRI6Y6MZ4f5eZjMVg/ztfkPXk1Jussx1lGXzvCgQw4MKXW NWkYsM8aFvJ2BvBkSLoCFIB9a6gKlzYI6IJ7uznkGrAik8Djmmq5ouY7nsOfN4Uf3JOcsG8kQb/ K+mMW7fzKc1tlmeEs+Se+Fo6BQZb9Hrivr45WzOOZQrdWY4gJuE0tG X-Received: by 2002:adf:f392:0:b0:46d:1433:77ec with SMTP id ffacd0b85a97d-47aab57d1cdmr4046239f8f.2.1783206670293; Sat, 04 Jul 2026 16:11:10 -0700 (PDT) Received: from localhost (97-115-81-230.ptld.qwest.net. [97.115.81.230]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-47aa09608d4sm11870922f8f.25.2026.07.04.16.11.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Jul 2026 16:11:09 -0700 (PDT) From: Elliot Douglas To: linux-input@vger.kernel.org Cc: lains@riseup.net, hadess@hadess.net, jikos@kernel.org, bentiss@kernel.org, linux-kernel@vger.kernel.org, edouglas7358@gmail.com Subject: [PATCH v2 2/2] HID: logitech-hidpp: enable reprogrammable buttons on Signature M650 Date: Sat, 4 Jul 2026 16:10:35 -0700 Message-ID: <2e719e56029386f148d748a7d555023f4efe3862.1783094954.git.edouglas7358@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The Bluetooth Signature M650 exposes its side buttons through the normal mouse report, but the observed events are short click-like events emitted around release rather than physical press/release state. The device appears to use the held side-button state for its built-in gesture and side-button + wheel horizontal-scroll mode. As a result, holding a side button long enough can prevent the normal mouse report from emitting a usable button event at all. HID++ REPROG_CONTROLS_V4 diversion for control IDs 0x0053 and 0x0056 provides real press and release timing for those same controls. Logitech documents the Signature M650 side buttons as Back/Forward buttons, so report the diverted controls as BTN_BACK and BTN_FORWARD. The HID++ 0x1b04 documentation lists those control IDs as Back and Forward. The driver still verifies that the controls are present in the device control table and advertised as divertable before changing their reporting mode. Link: https://support.logi.com/hc/en-nz/articles/4414473810583-Getting-Started-Signature-M650 Signed-off-by: Elliot Douglas --- drivers/hid/hid-logitech-hidpp.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index f9189e14fb78..e71dd2457e80 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -3624,14 +3624,30 @@ static int hidpp10_extra_mouse_buttons_raw_event(struct hidpp_device *hidpp, #define HIDPP_REPROG_CONTROLS_EVENT_DIVERTED 0x00 +#define HIDPP_REPROG_CONTROL_BACK 0x0053 +#define HIDPP_REPROG_CONTROL_FORWARD 0x0056 + +#define HIDPP_PRODUCT_SIGNATURE_M650 0xb02a + struct hidpp_reprog_control_mapping { u16 control; u16 code; }; +static const struct hidpp_reprog_control_mapping m650_reprog_control_mappings[] = { + { HIDPP_REPROG_CONTROL_BACK, BTN_BACK }, + { HIDPP_REPROG_CONTROL_FORWARD, BTN_FORWARD }, + { } +}; + static const struct hidpp_reprog_control_mapping * hidpp20_reprog_controls_get_mappings(struct hidpp_device *hidpp) { + switch (hidpp->hid_dev->product) { + case HIDPP_PRODUCT_SIGNATURE_M650: + return m650_reprog_control_mappings; + } + return NULL; } @@ -4911,7 +4927,9 @@ static const struct hid_device_id hidpp_devices[] = { { /* MX Vertical mouse over Bluetooth */ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb020) }, { /* Signature M650 over Bluetooth */ - HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb02a) }, + HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, + HIDPP_PRODUCT_SIGNATURE_M650), + .driver_data = HIDPP_QUIRK_HIDPP_REPROG_CONTROLS_BTNS }, { /* MX Master 3 mouse over Bluetooth */ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb023) }, { /* MX Anywhere 3 mouse over Bluetooth */ -- 2.54.0