systemd/SOURCES/0976-hwdb-Add-mapping-for-Xiaomi-Mipad-2-bottom-bezel-cap.patch

54 lines
2.0 KiB
Diff
Raw Permalink Normal View History

2024-11-12 10:48:44 +00:00
From cbaefad275ad3f3d87ef308409633e2f39b5c2c1 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Sun, 5 May 2024 19:40:12 +0200
Subject: [PATCH] hwdb: Add mapping for Xiaomi Mipad 2 bottom bezel capacitive
buttons
The Xiaomi Mipad2 tablet has 3 capacitive buttons at the bottom.
These 3 buttons are handled by the touchsceen (the touchscreen extends
downwards to cover the bottom bezel).
By default these send Windows specific shortcuts which do not work
with Linux desktop environments:
Menu: LeftMeta + S
Home: LeftCtrl + Esc
Back: Backspace
Map these to menu / leftmeta (Windows key / Win 8 tablet home button key) /
back.
(cherry picked from commit 5a99749453baf32bd911f263a07ee59ba96c1e1d)
Related: RHEL-5950
---
hwdb.d/60-keyboard.hwdb | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hwdb.d/60-keyboard.hwdb b/hwdb.d/60-keyboard.hwdb
index 20430c9085..60994f2a5d 100644
--- a/hwdb.d/60-keyboard.hwdb
+++ b/hwdb.d/60-keyboard.hwdb
@@ -1978,6 +1978,21 @@ evdev:name:SIPODEV USB Composite Device:dmi:bvn*:bvr*:bd*:svnVIOS:pnLTH17:*
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnINET:pnP325J:*
KEYBOARD_KEY_76=f21 # Touchpad toggle
+###########################################################
+# Xiaomi
+###########################################################
+
+# Fix mapping of menu / home / back capacitive buttons on bottom bezel
+# Menu: LeftMeta + S -> menu (ignore LeftMeta, map S to menu)
+# Home: LeftCtrl + Esc -> LeftMeta (ignore LeftCtrl, map Esc to LeftMeta)
+# Back: Backspace -> back (map backspace to back)
+evdev:name:FTSC1000:00 2808:509C Keyboard:dmi:*:svnXiaomiInc:pnMipad2:*
+ KEYBOARD_KEY_700e0=unknown # LeftCtrl -> ignore
+ KEYBOARD_KEY_700e3=unknown # LeftMeta -> ignore
+ KEYBOARD_KEY_70016=menu # S -> menu
+ KEYBOARD_KEY_70029=leftmeta # Esc -> LeftMeta (Windows key / Win8 tablets home)
+ KEYBOARD_KEY_7002a=back # Backspace -> back
+
###########################################################
# Zepto
###########################################################