History log of /frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
14f10e5d5f51bc54ca2a45ee62d3cfb6debd3af0 18-Sep-2013 Raph Levien <raph@google.com> Revert "Revert "Take the input device into account for meta state""

This reverts commit 3954fd9a05232cb6f7fc52aa49a0b34c1539028a, which
is equivalent to re-applying 8a1597b39632956cdbcb6b76874ccca786047d4c.

The change ("Take the input device into account for meta state") was
valid but caused CTS test failures because the test was wrong. The
test injected a key event with the meta state missing. This faulty
test was masked by the old toggle behavior.
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
3954fd9a05232cb6f7fc52aa49a0b34c1539028a 17-Sep-2013 Raph Levien <raph@google.com> Revert "Take the input device into account for meta state"

This reverts commit 8a1597b39632956cdbcb6b76874ccca786047d4c. That
commit broke some of the handling of meta state, which in turn caused
CTS test failures, notably bug 10210151 (CTS:
android.text.method.cts.BaseKeyListenerTest#testBackspace_withSendKeys
is failing on KLP).

So this revert fixes those test failures, but leaves bug 8303489
(Pressing shift on the hardware keyboard messes with unrelated
keypresses, including virtual ones) still present. We'll plan to
address that in a future release.

Change-Id: Iea42c643b6d08f33cbd2ed1747e8de3b5f8116a6
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
8a1597b39632956cdbcb6b76874ccca786047d4c 05-Mar-2013 Jean Chalard <jchalard@google.com> Take the input device into account for meta state

Interesting nits about this:
- getMetaState(long) and getMetaState(long, int) do not
seem to be used anywhere in the framework. Maybe we
want to skip adding getMetaState(long, KeyEvent) and
getMetaState(long, int, KeyEvent).
- getMetaState(CharSequence, int) is used extensively
throughout the code. In some places, a KeyEvent is
available and should be considered - this change does
implement this. In many other cases, there is no
relevant KeyEvent for this action (for example,
Editor#extractTextInternal). In these cases, the
behavior is affected by the current latch state, so
it's fine to leave them as is.

Bug: 8303489

Change-Id: I4a948c497c49e48f83ba1048520e7fe5bfe84727
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
f9bd5f69e2b540bbd3187fe1d7c7ca33f77f0cd9 05-Mar-2013 Jean Chalard <jchalard@google.com> Preparatory cleanups in MetaKeyKeyListener

This cleans up a comment mentioning a private API and
declares constants for the return value of some public
functions.

Bug: 8303489
Change-Id: If06cc64952a572c506961e8125d0874428b5580c
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
52715a7c10eeb798692ffdb4bc8c4305cb0aa705 09-Dec-2010 Jeff Brown <jeffbrown@google.com> Fix a regression in clearMetaKeyState.

Bug: 3267519
Change-Id: Ibbc7d4e38ef3208b9ece09566e44e8421866ab95
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
6b53e8daa69cba1a2a5a7c95a01e37ce9c53226c 11-Nov-2010 Jeff Brown <jeffbrown@google.com> Added support for full PC-style keyboards.

BREAKING CHANGE: Redesigned the key character map format to
accomodate full keyboards with more comprehensive suite of modifiers.
Old key character maps will not work anymore and must be updated.
The new format is plain text only and it not compiled to a binary
file (so the "kcm" tool will be removed in a subsequent check-in).

Added FULL keyboard type to support full PC-style keyboards.

Added SPECIAL_FUNCTION keyboard type to support special function
keypads that do not have any printable keys suitable for typing
and only have keys like HOME and POWER

Added a special VIRTUAL_KEYBOARD device id convention that maps
to a virtual keyboard with a fixed known layout. This is designed
to work around issues injecting input events on devices whose
built-in keyboard does not have a useful key character map (ie.
when the built-in keyboard is a special function keyboard only.)

Modified several places where events were being synthesized
to use the virtual keyboard.

Removed support for the "qwerty" default layout.
The new default layout is "Generic". For the most part "qwerty"
was being used as a backstop in case the built-in keyboard did
not have a key character map (probably because it was a special
function keypad) and the framework needed to be able to inject
key events anyways. The latter issue is resolved by using the
special VIRTUAL_KEYBOARD device instead of BUILT_IN_KEYBOARD.

Added the concept of a key modifier behavior so that
MetaKeyKeyListener can distinguish between keyboards that use
chorded vs. toggled modifiers.

Wrote more robust key layout and key character map parsers
to enable support for new keyboard features and user installable
key maps.

Fixed a bug in InputReader generating key ups when keys
are released out of sequence.

Updated tons of documentation.

Currently QwertyKeyListener is being used for full keyboards
with autotext and capitalization disabled. This mostly works
but causes some problems with character pickers, etc.
These issues will be resolved in subsequent changes.

Change-Id: Ica48f6097a551141c215bc0d2c6f7b3fb634d354
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
497a92cc5ba2176b8a8484b0a7da040eac0e887b 13-Sep-2010 Jeff Brown <jeffbrown@google.com> Add keycodes and meta-key modifiers to support external keyboards.

Added new key maps for external keyboards. These maps are intended to
be shared across devices by inheriting the "keyboards.mk" product
makefile as part of the device's product definition.

One of the trickier changes here was to unwind some code in
MetaKeyKeyListener that assumed that only the low 8 bits of the meta key
state were actually used. The new code abandons bitshifts in favor
of simple conditionals that are probably easier to read anyways.
The special meta key state constants used by MetaKeyKeyListener
are now (@hide) defined in KeyEvent now so as to make it clearer that they
share the same code space even if those codes are not valid for KeyEvents.

The EventHub now takes care of detecting the appropriate key layout
map and key character map when the device is added and sets system
properties accordingly. This avoids having duplicate code in
KeyCharacterMap to probe for the appropriate key character map
although the current probing mechanism has been preserved for legacy
reasons just in case.

Added support for tracking caps lock, num lock and scroll lock and
turning their corresponding LEDs on and off as needed.

The key character map format will need to be updated to correctly support
PC style external keyboard semantics related to modifier keys.
That will come in a later change so caps lock doesn't actually do
anything right now except turn the shiny LEDs on and off...

Added a list of symbolic key names to KeyEvent and improved the toString()
output for debug diagnosis. Having this list in a central place in the
framework also allows us to remove it from Monkey so there is one less
thing to maintain when we add new keycodes.

Bug: 2912307
Change-Id: If8c25e8d50a7c29bbf5d663c94284f5f86de5da4
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
b2a3dd88a53cc8c6d19f6dc8ec4f3d6c4abd9b54 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
da996f390e17e16f2dfa60e972e7ebc4f868f37e 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
b798689749c64baba81f02e10cf2157c747d6b46 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/text/method/MetaKeyKeyListener.java