From: Alex Yeo <alexyeo362@gmail.com>
To: platform-driver-x86@vger.kernel.org
Cc: alexyeo362@gmail.com, "Kenneth Chan" <kenneth.t.chan@gmail.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v1] platform/x86: panasonic-laptop: register FN key up/down events
Date: Fri, 28 Aug 2026 08:34:31 +0800 [thread overview]
Message-ID: <20260828003432.88748-1-alexyeo362@gmail.com> (raw)
For Let's Note laptops, pressing the FN key sends a signal for both
keyup and keydown.
FN key down: 0x0030
FN key up: 0x0031
Currently, pressing the FN key causes the following output in dmesg:
[ +0.322901] Unknown hotkey event: 0x0030
[ +1.101006] Unknown hotkey event: 0x0031
This has a tendency to spam dmesg as this is printed every time
the FN key is pressed regardless of whether or not it was used
as a modifier to activate functions like brightness, etc.
Map both the keyup/down events so it is no longer reported as
unknown hotkeys.
Once the patch has been applied, evtest shows the following when
the FN key is pressed (and released):
Event: time 1787875023.918171, type 4 (EV_MSC), code 4 (MSC_SCAN), value 30
Event: time 1787875023.918171, type 1 (EV_KEY), code 464 (KEY_FN), value 1
Event: time 1787875023.918171, -------------- SYN_REPORT ------------
Event: time 1787875024.038462, type 4 (EV_MSC), code 4 (MSC_SCAN), value 30
Event: time 1787875024.038462, type 1 (EV_KEY), code 464 (KEY_FN), value 0
Event: time 1787875024.038462, -------------- SYN_REPORT ------------
Tested on the following Let's Note models:
- CF-SX1
- CF-RZ6
- CF-SV8
- CF-QV9
- CF-SR4
Signed-off-by: Alex Yeo <alexyeo362@gmail.com>
---
drivers/platform/x86/panasonic-laptop.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index 19d194ff37ca..cfc2c79da554 100644
--- a/drivers/platform/x86/panasonic-laptop.c
+++ b/drivers/platform/x86/panasonic-laptop.c
@@ -232,6 +232,7 @@ static const struct key_entry panasonic_keymap[] = {
{ KE_KEY, 41, { KEY_MACRO9 } },
{ KE_KEY, 42, { KEY_MACRO10 } },
{ KE_KEY, 43, { KEY_MACRO11 } },
+ { KE_KEY, 48, { KEY_FN } },
{ KE_END, 0 }
};
@@ -863,6 +864,17 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
key, 0x80, false);
}
+ /*
+ * Let's Note models report both FN key down and key up
+ * without the expected 0x80 key up/down bit
+ */
+ if (key == 48) {
+ updown = 1;
+ } else if (key == 49) {
+ key = 48;
+ updown = 0;
+ }
+
/*
* Don't report brightness key-presses if they are also reported
* by the ACPI video bus.
--
2.55.0
next reply other threads:[~2026-08-28 0:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 0:34 Alex Yeo [this message]
2026-09-16 14:19 ` Ilpo Järvinen
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=20260828003432.88748-1-alexyeo362@gmail.com \
--to=alexyeo362@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kenneth.t.chan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@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®