From: DemonPlayer <a18165943161@gmail.com>
To: linux-input@vger.kernel.org
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
linux-kernel@vger.kernel.org,
DemonPlayer <a18165943161@gmail.com>
Subject: [PATCH] HID: apple: Add GANSS GS3104T PRO to the non-Apple keyboard list
Date: Sun, 4 Oct 2026 00:15:08 +0800 [thread overview]
Message-ID: <20261003161508.22671-1-a18165943161@gmail.com> (raw)
The GANSS GS3104T PRO is a tri-mode mechanical keyboard that reports
Apple's vendor and product IDs (05ac:024f) over USB, over its 2.4 GHz
receiver and over Bluetooth, so that macOS recognises it without a
vendor driver. hid->name is built from the product string only and it
differs per connection mode:
USB: "HFD GS3104T PRO" (iManufacturer is "HFD")
2.4 GHz: "GS3104T-PRO 2.4G" (no iManufacturer)
Bluetooth: "GS3104T PRO"
All three descriptors carry the Apple Fn key usage (Usage Page 0xFF00,
Usage 0x03), so hid-apple claims the device in every mode and applies
the Apple function key layout: with the default fnmode=3,
hidinput_apple_event() resolves real_fnmode to 1 (fkeyslast), so the
F-row sends the media keys and Fn has to be held down to get F1-F12.
That is not the behaviour the keyboard has on other operating systems.
hid-apple already keeps a list of such keyboards and switches them to
the fnmode=2 (fkeysfirst) behaviour, but the match is a case-sensitive
strncmp() prefix test against hid->name and none of the three names
matches an existing entry: the "GANSS" one misses because the brand does
not appear in any of the descriptors, and "hfd.cn" does not match
either. The non-Apple handling is thus never enabled and users have to
pass hid_apple.fnmode=2 on the kernel command line to get the expected
default.
Add all three names to non_apple_keyboards[].
Signed-off-by: DemonPlayer <a18165943161@gmail.com>
---
drivers/hid/hid-apple.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index f6134c5..75092ee 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -373,6 +373,9 @@ static const struct apple_non_apple_keyboard non_apple_keyboards[] = {
{ "2.4G Wireless Receiver" }, /* EPOMAKER TH87 dongle */
{ "Thock TKL Wireless" }, /* ENDORFY THOCK TKL BT mode */
{ "USB Dongle" }, /* ENDORFY THOCK TKL dongle */
+ { "HFD GS3104T PRO" }, /* GANSS GS3104T PRO USB mode */
+ { "GS3104T-PRO 2.4G" }, /* GANSS GS3104T PRO 2.4G dongle */
+ { "GS3104T PRO" }, /* GANSS GS3104T PRO Bluetooth */
};
static bool apple_is_non_apple_keyboard(struct hid_device *hdev)
--
2.56.0
reply other threads:[~2026-10-03 16:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261003161508.22671-1-a18165943161@gmail.com \
--to=a18165943161@gmail.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®