systemd/SOURCES/0986-hwdb-Enable-JP-IK-LEAP-W502-s-touchpad-toggle-key.patch

47 lines
1.9 KiB
Diff

From eba607db8ae4beca08417bab9dd0f92b681f9af3 Mon Sep 17 00:00:00 2001
From: Jian-Hong Pan <jhp@endlessos.org>
Date: Fri, 17 May 2024 11:32:30 +0800
Subject: [PATCH] hwdb: Enable JP-IK LEAP W502's touchpad toggle key
The laptop JP-IK LEAP W502 has touchpad toggle key (Fn+F9), but it does
not work. Because, the scancode maps to a wrong key code:
Event: time 1715846095.224900, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9d
Event: time 1715846095.224900, type 1 (EV_KEY), code 97 (KEY_RIGHTCTRL), value 1
Event: time 1715846095.224900, -------------- SYN_REPORT ------------
Event: time 1715846095.230985, type 4 (EV_MSC), code 4 (MSC_SCAN), value db
Event: time 1715846095.230985, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 1
Event: time 1715846095.230985, -------------- SYN_REPORT ------------
Event: time 1715846095.232903, type 4 (EV_MSC), code 4 (MSC_SCAN), value 76
Event: time 1715846095.232903, type 1 (EV_KEY), code 85 (KEY_ZENKAKUHANKAKU), value 1
Event: time 1715846095.232903, -------------- SYN_REPORT ------------
Map the scancode 76 to KEY_F21 to enable the touchpad toggle key.
(cherry picked from commit 5ccd8ab263e1e2f75ade9b77b1b79ec8bb3074b2)
Related: RHEL-5950
---
hwdb.d/60-keyboard.hwdb | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hwdb.d/60-keyboard.hwdb b/hwdb.d/60-keyboard.hwdb
index 89f02cdc77..5af2303e98 100644
--- a/hwdb.d/60-keyboard.hwdb
+++ b/hwdb.d/60-keyboard.hwdb
@@ -915,6 +915,14 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnINVENTEC:pnSYMPHONY*6.0/7.0:*
KEYBOARD_KEY_f3=prog2
KEYBOARD_KEY_f4=prog1
+###########################################################
+# JP-IK
+###########################################################
+
+# LEAP W502
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnJP-IK:pnLEAPW502:pvr*
+ KEYBOARD_KEY_76=f21 # touchpad toggle
+
###########################################################
# Kvadra
###########################################################