summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-04-18 14:09:10 -0700
committerJeff Brown <jeffbrown@google.com>2012-04-18 15:01:57 -0700
commit9a2bbf680e3b5b98051b9f2913ab6bd31b77f79a (patch)
tree0e6d9dc80e52a02873462a0e051e34fd6f657bbc /include
parentf35ea5d25b286e166bdc43a589a45b56b6358499 (diff)
downloadframeworks_base-9a2bbf680e3b5b98051b9f2913ab6bd31b77f79a.zip
frameworks_base-9a2bbf680e3b5b98051b9f2913ab6bd31b77f79a.tar.gz
frameworks_base-9a2bbf680e3b5b98051b9f2913ab6bd31b77f79a.tar.bz2
Improve handling of certain keyboard layout properties.
Automatically choose a default value for the 'number' property based on the characters that the key can generate. Don't generate any character when ctrl, alt or meta is pressed unless the behavior exactly matches the modifier keys that are pressed. Simplified the basic keyboard layouts taking into account the new features. Bug: 6110399 Change-Id: Ibc0f0b50c2dcf3f962a33ac77c24d2993b77637d
Diffstat (limited to 'include')
-rw-r--r--include/androidfw/KeyCharacterMap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/androidfw/KeyCharacterMap.h b/include/androidfw/KeyCharacterMap.h
index 8db5781..06799f9 100644
--- a/include/androidfw/KeyCharacterMap.h
+++ b/include/androidfw/KeyCharacterMap.h
@@ -206,6 +206,7 @@ private:
status_t parseMapKey();
status_t parseKey();
status_t parseKeyProperty();
+ status_t finishKey(Key* key);
status_t parseModifier(const String8& token, int32_t* outMetaState);
status_t parseCharacterLiteral(char16_t* outCharacter);
};
@@ -224,6 +225,7 @@ private:
bool getKey(int32_t keyCode, const Key** outKey) const;
bool getKeyBehavior(int32_t keyCode, int32_t metaState,
const Key** outKey, const Behavior** outBehavior) const;
+ static bool matchesMetaState(int32_t eventMetaState, int32_t behaviorMetaState);
bool findKey(char16_t ch, int32_t* outKeyCode, int32_t* outMetaState) const;