summaryrefslogtreecommitdiffstats
path: root/include/ui/Input.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-11-29 17:37:49 -0800
committerJeff Brown <jeffbrown@google.com>2010-11-30 17:15:49 -0800
commit47e6b1b5eef8ee99872f278f66bc498c4fcca0d8 (patch)
treeef5a7c87b8dca433ea9707c1289ae7c8d2ba3787 /include/ui/Input.h
parent735206f121cb2a11b3397870e6565178627e0aa3 (diff)
downloadframeworks_base-47e6b1b5eef8ee99872f278f66bc498c4fcca0d8.zip
frameworks_base-47e6b1b5eef8ee99872f278f66bc498c4fcca0d8.tar.gz
frameworks_base-47e6b1b5eef8ee99872f278f66bc498c4fcca0d8.tar.bz2
Support non-orientation aware keyboards and other devices.
Fixed a bug with dpad keys on external keyboards being rotated according to the display orientation by adding a new input device configuration property called "keyboard.orientationAware". Added a mechanism for overriding the key layout and key character map in the input device configuration file using the new "keyboard.layout" and "keyboard.characterMap" properties. Also added "trackball.orientationAware", "touch.orientationAware" and "touch.deviceType" configuration properties. Rewrote the configuration property reading code in native code so that it can be used by EventHub and other components. Added basic support for installable idc, kl, and kcm files in /data/system/devices. However, there is no provision for copying files there yet. Disabled long-press character pickers on full keyboards so that key repeating works as expected. Change-Id: I1bd9f0c3d344421db444e7d271eb09bc8bab4791
Diffstat (limited to 'include/ui/Input.h')
-rw-r--r--include/ui/Input.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/ui/Input.h b/include/ui/Input.h
index 1355bab..11b798f 100644
--- a/include/ui/Input.h
+++ b/include/ui/Input.h
@@ -497,6 +497,24 @@ private:
KeyedVector<int32_t, MotionRange> mMotionRanges;
};
+/* Types of input device configuration files. */
+enum InputDeviceConfigurationFileType {
+ INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION = 0, /* .idc file */
+ INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_LAYOUT = 1, /* .kl file */
+ INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_CHARACTER_MAP = 2, /* .kcm file */
+};
+
+/*
+ * Get the path of an input device configuration file, if one is available.
+ * Spaces in the name are replaced with underscores.
+ *
+ * Looks in: <system-root>/usr/<type-specific-directory>/<name><extension>.
+ *
+ * TODO Also look in a user installable location.
+ * Returns an empty string if not found.
+ */
+extern String8 getInputDeviceConfigurationFilePath(
+ const String8& name, InputDeviceConfigurationFileType type);
} // namespace android