richardphibel / rpms / systemd

Forked from rpms/systemd a year ago
Clone
8d419f
From e8de40fbfab79cc86729e13b924251c1af8567ba Mon Sep 17 00:00:00 2001
8d419f
From: Lubomir Rintel <lkundrak@v3.sk>
8d419f
Date: Sun, 22 Jul 2018 00:25:51 +0200
8d419f
Subject: [PATCH] hwdb: 60-keyboard: Support the buttons on CZC P10T tablet
8d419f
8d419f
The machine has tree buttons connected to an EC that acts as a regular
8d419f
AT-compatible keyboard controller. It can be either in "Windows 7" or
8d419f
"Android" mode. It boots up with the earlier, but the Android build on
8d419f
the tablet switches it on bootup (Windows presumably leaves it as-is).
8d419f
8d419f
The "Windows 7" mode, the behavior is very inconvenient: the Home button
8d419f
emits multiple key presses that presumably do something in Windws 7 while
8d419f
the second button toggles the RF Kill Switch in addition to producing a
8d419f
scancode (it's labeled "Back" on Android version of the tablet).
8d419f
8d419f
The "Android" mode just sends the good ol' scan codes and this patch
8d419f
handles them. On mainline Linux, the "x86-android-tablets" driver makes
8d419f
sure we're in the correct mode.
8d419f
8d419f
(cherry picked from commit f2f11dfbb7f30d279ab3c9b3c84de5496407112d)
8d419f
8d419f
Related: #2087778
8d419f
---
8d419f
 hwdb.d/60-keyboard.hwdb | 14 ++++++++++++++
8d419f
 1 file changed, 14 insertions(+)
8d419f
8d419f
diff --git a/hwdb.d/60-keyboard.hwdb b/hwdb.d/60-keyboard.hwdb
8d419f
index 3d6e56983b..66561eac35 100644
8d419f
--- a/hwdb.d/60-keyboard.hwdb
8d419f
+++ b/hwdb.d/60-keyboard.hwdb
8d419f
@@ -1891,6 +1891,20 @@ evdev:input:b0003v1038p0310*
8d419f
  KEYBOARD_KEY_7002f=f11
8d419f
  KEYBOARD_KEY_70046=f6
8d419f
 
8d419f
+###########################################################
8d419f
+# CZC
8d419f
+###########################################################
8d419f
+
8d419f
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnCZC:pnODEON*TPC-10:*
8d419f
+ KEYBOARD_KEY_01=leftmeta                               # Home button held for 2s
8d419f
+ KEYBOARD_KEY_db=prog1                                  # Home button
8d419f
+ KEYBOARD_KEY_dd=rfkill                                 # Second button labeled Wi-Fi
8d419f
+
8d419f
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnViewSonic:pnVPAD10:*
8d419f
+ KEYBOARD_KEY_01=leftmeta                               # Home button held for 2s
8d419f
+ KEYBOARD_KEY_db=prog1                                  # Home button
8d419f
+ KEYBOARD_KEY_dd=back                                   # Second button labeled Back
8d419f
+
8d419f
 ###########################################################
8d419f
 # Other
8d419f
 ###########################################################