summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-04-17 19:21:34 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-17 19:21:34 -0700
commit6957b60378597ee5bffd9ac125cd8aff1142664f (patch)
tree550b41abc78665e1a2c4257cced3dc3e5c3ba9b5 /include
parent62d52f9ff8b57fcd5f7fc6e2373ec5851eb80757 (diff)
parent4a3862f6b0a8971b6ab5b1c46735b28e7604d0db (diff)
downloadframeworks_base-6957b60378597ee5bffd9ac125cd8aff1142664f.zip
frameworks_base-6957b60378597ee5bffd9ac125cd8aff1142664f.tar.gz
frameworks_base-6957b60378597ee5bffd9ac125cd8aff1142664f.tar.bz2
Merge "Add Dvorak keyboard layout."
Diffstat (limited to 'include')
-rw-r--r--include/androidfw/KeyCharacterMap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/androidfw/KeyCharacterMap.h b/include/androidfw/KeyCharacterMap.h
index e0e6ffa..8db5781 100644
--- a/include/androidfw/KeyCharacterMap.h
+++ b/include/androidfw/KeyCharacterMap.h
@@ -120,6 +120,10 @@ public:
bool getEvents(int32_t deviceId, const char16_t* chars, size_t numChars,
Vector<KeyEvent>& outEvents) const;
+ /* Maps a scan code and usage code to a key code, in case this key map overrides
+ * the mapping in some way. */
+ status_t mapKey(int32_t scanCode, int32_t usageCode, int32_t* outKeyCode) const;
+
#if HAVE_ANDROID_OS
/* Reads a key map from a parcel. */
static sp<KeyCharacterMap> readFromParcel(Parcel* parcel);
@@ -198,6 +202,8 @@ private:
private:
status_t parseType();
+ status_t parseMap();
+ status_t parseMapKey();
status_t parseKey();
status_t parseKeyProperty();
status_t parseModifier(const String8& token, int32_t* outMetaState);
@@ -209,6 +215,9 @@ private:
KeyedVector<int32_t, Key*> mKeys;
int mType;
+ KeyedVector<int32_t, int32_t> mKeysByScanCode;
+ KeyedVector<int32_t, int32_t> mKeysByUsageCode;
+
KeyCharacterMap();
KeyCharacterMap(const KeyCharacterMap& other);