summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/KeyCharacterMap.java
Commit message (Collapse)AuthorAgeFilesLines
* AArch64: Use long for pointers in KeyCharacterMap classAshok Bhat2014-01-081-12/+12
| | | | | | | | | | For storing pointers, long is used in KeyCharacterMap class, as native pointers can be 64-bit. Change-Id: Idc1b39874202e96b9231d7801e6707003787659b Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
* Fix dead key -> space combination.Jean Chalard2013-02-251-2/+14
| | | | | | | | | This also fixes "dead key -> same dead key" combination. Both these key sequences should only give the non-combining version of the combining character. Bug: 8158374 Change-Id: I51f01685dd2997c2c5316ce6aa4f10ac9354c877
* Fix bugs in fallback key handling.Jeff Brown2012-05-091-9/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a fallback key is generated using a key plus a modifier, then it's possible we might get a different fallback key generated if the modifier has changed. PhoneWindowManager needs to remember which fallback is last generated for a given key code so that it can apply the same fallback action. When generating cancellation events, it's important to have preserved the policyFlags of the original event. Otherwise we may not dispatch the cancellation properly. For example, some actions are not performed if the POLICY_FLAG_TRUSTED is not specified. Remember the metaState associated with a key event so we can include it when canceled. Tell the policy when a fallback is being cancelled so that it can clean up its state. After a SEARCH shortcut is invoked, clear the flag indicating that a shortcut is pending. This is to prevent SEARCH from getting stuck down in the case where we might forget to send the up. (Shouldn't happen anymore after the prior fixes.) Bug: 5616255 Change-Id: I68f0a9679c7af464eaf31c099f2aa50b53fecf1f
* Add yet more keyboard layouts.Jeff Brown2012-04-251-6/+40
| | | | | Bug: 6110399 Change-Id: I8e2ce1cd350dddb006df51286e127dce65a8117f
* Add more dead keys. Use NFC tables for composition.Jeff Brown2012-04-181-135/+86
| | | | | Bug: 6110399 Change-Id: I343d24df21dac2c069136b016e70e39f0feb6df9
* Improve selection of dead key accent chars.Jeff Brown2012-04-181-152/+167
| | | | | | | | | The '^', '`', and '~' characters that we use for circumflex, grave and tilde accents are ugly. Use the appropriate printing modifier characters instead. Bug: 6110399 Change-Id: I53891139ed1cef3010f5319ff49df1eeb1c6feeb
* Notify applications when input devices change.Jeff Brown2012-04-121-2/+0
| | | | | | | | | | | | | | | | | This change allows the InputManager to keep track of what input devices are registered with the system and when they change. It needs to do this so that it can properly clear its cache of input device properties (especially the key map!) when changes occur. Added new API so that applications can register listeners for input device changes. Fixed a minor bug in EventHub where it didn't handle EPOLLHUP properly so it would spam the log about unsupposed epoll events until inotify noticed that the device was gone and removed it. Change-Id: I937d8c601f7185d4299038bce6a2934fe4fdd2b3
* Request key maps from input manager service.Jeff Brown2012-04-101-35/+52
| | | | | | | | | | | | | | | | | | Instead of each application loading the KeyCharacterMap from the file system, get them from the input manager service as part of the InputDevice object. Refactored InputManager to be a proper singleton instead of having a bunch of static methods. InputManager now maintains a cache of all InputDevice objects that it has loaded. Currently we never invalidate the cache which can cause InputDevice to return stale motion ranges if the device is reconfigured. This will be fixed in a future change. Added a fake InputDevice with ID -1 to represent the virtual keyboard. Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
* Move some APIs from window manager to input manager.Jeff Brown2012-04-051-14/+3
| | | | | | | | | | Simplified input injection API down to just one call. Removed all input state reading API. It was only used by the window manager policy and required a permission that applications could not obtain. READ_INPUT_STATE is now unused and deprecated. Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
* Initial commit of InputManager and keyboard layout API.Jeff Brown2012-04-051-1/+11
| | | | | | | | | | | | | | | | | | Added a new InputManager service for interacting with input devices and configuring them. This will be the focus of an upcoming refactoring. Added an API for registering keyboard layouts with the system based on the use of a broadcast receiver. Applications can register their own keyboard layouts simply by declaring a broadcast receiver in their manifests. Added the skeleton of a package that will ultimately contain the keyboard layouts and other input device related resources that are part of the base system. Bug: 6110399 Change-Id: Ie01b0ef4adbd5198f6f012e73964bdef3c51805c
* Eliminate hw.keyboards system properties.Jeff Brown2011-11-151-3/+12
| | | | | | | | | | | | Stop using system properties to publish information about the key character map path. Instead, we can retrieve it on demand by asking the window manager. It was possible to exhaust the supply of system properties when repeatedly adding and removing input devices. Bug: 5532806 Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
* Rework display size access.Dianne Hackborn2011-04-211-1/+1
| | | | | | | | Applications now get the display size from the window manager. No behavior should be changed yet, this is just prep for some real changes. Change-Id: I2958a6660895c1cba2b670509600014e55ee9273
* Rename KeyCharacterMap.UnavailableException.Jeff Brown2011-01-191-3/+3
| | | | | Bug: 3370261 Change-Id: I5cdca8ef2300b70b7a0fcc7e2c26765079645ecc
* Make framework modifier key handling more precise.Jeff Brown2010-12-131-13/+3
| | | | Change-Id: I0cc2276b31f882170aea575288f607a3a4ee05d4
* Add support for fallback keycodes.Jeff Brown2010-12-071-7/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | This change enables the framework to synthesize key events to implement default behavior when an application does not handle a key. For example, this change enables numeric keypad keys to perform their associated special function when numlock is off. The application is informed that it is processing a fallback keypress so it can choose to ignore it. Added a new keycode for switching applications. Added ALT key deadkeys. New default key mappings: - ESC -> BACK - Meta+ESC -> HOME - Alt+ESC -> MENU - Meta+Space -> SEARCH - Meta+Tab -> APP_SWITCH Fixed some comments. Fixed some tests. Change-Id: Id7f3b6645f3a350275e624547822f72652f3defe
* Fix documentation bug.Jeff Brown2010-11-301-1/+1
| | | | Change-Id: Idd8857087a61e357466c8db60d56075637240c5d
* Ensure the ShortcutManager uses the correct key character map.Jeff Brown2010-11-301-0/+12
| | | | | | | | | | | | | | | | | The ShortcutManager used to only receive the key code of the key event that triggered the shortcut. This change now provides the shortcut manager with the whole key event so it can look up the associated character using the correct key character map. To make this more efficient, added a mechanism for recycling key events. At the moment it is only used by key events owned by the system process, since clients of the existing API (such as Views) might continue to hold on to key events after dispatch has finished so they would break if the key event were recycled by the framework. Deprecated KeyCharacterMap.BUILT_IN_KEYBOARD. Change-Id: I4313725dd63f2be01c350c005a41c7fde9bc67e8
* Added support for full PC-style keyboards.Jeff Brown2010-11-181-208/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add support for new input sources.Jeff Brown2010-07-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Added several new coordinate values to MotionEvents to capture touch major/minor area, tool major/minor area and orientation. Renamed NDK input constants per convention. Added InputDevice class in Java which will eventually provide useful information about available input devices. Added APIs for manufacturing new MotionEvent objects with multiple pointers and all necessary coordinate data. Fixed a bug in the input dispatcher where it could get stuck with a pointer down forever. Fixed a bug in the WindowManager where the input window list could end up containing stale removed windows. Fixed a bug in the WindowManager where the input channel was being removed only after the final animation transition had taken place which caused spurious WINDOW DIED log messages to be printed. Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+545
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-545/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-0/+24
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+521