summaryrefslogtreecommitdiffstats
path: root/include/ui/EventHub.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/EventHub.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/EventHub.h')
-rw-r--r--include/ui/EventHub.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ui/EventHub.h b/include/ui/EventHub.h
index f4dc536..6c798a6 100644
--- a/include/ui/EventHub.h
+++ b/include/ui/EventHub.h
@@ -26,6 +26,7 @@
#include <utils/threads.h>
#include <utils/List.h>
#include <utils/Errors.h>
+#include <utils/PropertyMap.h>
#include <linux/input.h>
@@ -156,6 +157,8 @@ public:
virtual String8 getDeviceName(int32_t deviceId) const = 0;
+ virtual void getConfiguration(int32_t deviceId, PropertyMap* outConfiguration) const = 0;
+
virtual status_t getAbsoluteAxisInfo(int32_t deviceId, int axis,
RawAbsoluteAxisInfo* outAxisInfo) const = 0;
@@ -205,6 +208,8 @@ public:
virtual String8 getDeviceName(int32_t deviceId) const;
+ virtual void getConfiguration(int32_t deviceId, PropertyMap* outConfiguration) const;
+
virtual status_t getAbsoluteAxisInfo(int32_t deviceId, int axis,
RawAbsoluteAxisInfo* outAxisInfo) const;
@@ -247,6 +252,8 @@ private:
uint32_t classes;
uint8_t* keyBitmask;
KeyLayoutMap* layoutMap;
+ String8 configurationFile;
+ PropertyMap* configuration;
KeyMapInfo keyMapInfo;
int fd;
device_t* next;
@@ -264,6 +271,7 @@ private:
bool markSupportedKeyCodesLocked(device_t* device, size_t numCodes,
const int32_t* keyCodes, uint8_t* outFlags) const;
+ void loadConfiguration(device_t* device);
void configureKeyMap(device_t* device);
void setKeyboardProperties(device_t* device, bool firstKeyboard);
void clearKeyboardProperties(device_t* device, bool firstKeyboard);