[PATCH v1] platform/x86: panasonic-laptop: register FN key up/down events
From: Alex Yeo
Date: Thu Aug 27 2026 - 20:35:29 EST
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@xxxxxxxxx>
---
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