From: juntingwang Date: Fri, 1 Mar 2013 08:02:56 +0000 (+0800) Subject: Set PS2 Keyboard controller as not a ketboard type X-Git-Tag: android-x86-6.0-r1~7^2~3 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fframeworks-native.git;a=commitdiff_plain;h=dc1c79e92424a87c4887a896ec8d60e6a608dcab Set PS2 Keyboard controller as not a ketboard type 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 --- diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp index c811bacf36..515e28753c 100644 --- a/services/inputflinger/EventHub.cpp +++ b/services/inputflinger/EventHub.cpp @@ -1284,7 +1284,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.