* [PATCH v1] platform/x86: panasonic-laptop: register FN key up/down events
@ 2026-08-28 0:34 Alex Yeo
2026-09-16 14:19 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Alex Yeo @ 2026-08-28 0:34 UTC (permalink / raw)
To: platform-driver-x86
Cc: alexyeo362, Kenneth Chan, Hans de Goede, Ilpo Järvinen,
linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1] platform/x86: panasonic-laptop: register FN key up/down events
2026-08-28 0:34 [PATCH v1] platform/x86: panasonic-laptop: register FN key up/down events Alex Yeo
@ 2026-09-16 14:19 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2026-09-16 14:19 UTC (permalink / raw)
To: platform-driver-x86, Alex Yeo; +Cc: Kenneth Chan, Hans de Goede, linux-kernel
On Fri, 28 Aug 2026 08:34:31 +0800, Alex Yeo wrote:
> 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:
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.
The list of commits applied:
[1/1] platform/x86: panasonic-laptop: register FN key up/down events
commit: a3aafecfa1220c5884dcaf01f125212ebd8841c0
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-16 14:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-28 0:34 [PATCH v1] platform/x86: panasonic-laptop: register FN key up/down events Alex Yeo
2026-09-16 14:19 ` Ilpo Järvinen
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®