From 9a2bbf680e3b5b98051b9f2913ab6bd31b77f79a Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 18 Apr 2012 14:09:10 -0700 Subject: 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 --- include/androidfw/KeyCharacterMap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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; -- cgit v1.1