OSDN Git Service

Set PS2 Keyboard controller as not a ketboard type
authorjuntingwang <Junting.Wang@windriver.com>
Fri, 1 Mar 2013 08:02:56 +0000 (16:02 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 25 Sep 2013 02:52:15 +0000 (10:52 +0800)
The Eventhub detects the platforms built-in PS/2 keyboard controller
as a physical keyboard. So the system will not display the software
keyboard by default. Modify it device type in Keyboard-less tablets,
so that ActivityManager will not ignore the PS/2 controller.

Issue: AXIA-1875

Change-Id: Ia5b7592e82aaf1970066bab5e9ca5f46ac83ab1c
Signed-off-by: juntingwang <Junting.Wang@windriver.com>
services/input/EventHub.cpp

index 00a9765..51199e8 100644 (file)
@@ -1199,7 +1199,11 @@ status_t EventHub::openDeviceLocked(const char *devicePath, bool ignoreAlreadyOp
 
         // 'Q' key support = cheap test of whether this is an alpha-capable kbd
         if (hasKeycodeLocked(device, AKEYCODE_Q)) {
-            device->classes |= INPUT_DEVICE_CLASS_ALPHAKEY;
+            char value[PROPERTY_VALUE_MAX];
+            property_get("ro.ignore_atkbd", value, "0");
+            if ((device->identifier.name != "AT Translated Set 2 keyboard") || (!atoi(value))) {
+                device->classes |= INPUT_DEVICE_CLASS_ALPHAKEY;
+            }
         }
 
         // See if this device has a DPAD.