6 Commits

Author SHA1 Message Date
Jeff Brown
8bca94ad83 More work on international keyboards.
Changed the English US keymaps to implement a strict US key map
with no additional ALT functions.

Fixed a bug copying the alias in the InputDevice copy constructor.

Added support for end of line comments in KCM and KL files.

Added the German keyboard layout.

Sorted the keys in the keyboard layout files by physical arrangement
to make it easier to maintain them.

Bug: 6110399
Change-Id: If44d83de5b98f2bf0016cbb8e12264387b286aaa
2012-04-23 16:12:32 -07:00
Jeff Brown
4a3862f6b0 Add Dvorak keyboard layout.
Added support for mapping both scan codes and HID usages to
KeyLayoutMap and KeyCharacterMap.  Keyboard overlays can
now influence how key events are mapped to key codes.

Bug: 6110399
Change-Id: I6619fd2d3e1337c55928f89869dbc45b535c7ccf
2012-04-17 18:50:05 -07:00
Jeff Brown
cc11698319 HID usage should take precedence over scan code.
Change-Id: Ibd8988e3dcc0d64f4019ffe491d9789733f9d243
2012-04-12 10:05:41 -07:00
Jeff Brown
49ccac530b Refactor key code mapping.
Added handling for EV_MSC / MSC_SCAN which typically reports
the HID usage associated with a key.  This will enable key maps
to map keys with HID usages that Linux does not natively recognize.

Removed keyCode and flags fields from EventHub RawEvent since
they don't necessarily make sense in isolation now that we
pay attention to HID usage codes too.

Removed the fallback code for mapping keys and axes.  In practice,
an input device should be self-sufficient.  We should not ever
need to look at the built-in keyboard's key map.  In fact, there
usually isn't a built-in keyboard anyhow.  This code was originally
working around a problem where we weren't loading the key map
for touch screens with virtual keys, which has long since been fixed.

Change-Id: I0a319bdec44be9514f795526347397e94d53a127
2012-04-11 20:28:09 -07:00
Jeff Brown
9f25b7fdf2 Request key maps from input manager service.
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
2012-04-10 18:23:58 -07:00
Mathias Agopian
83c64e6b62 frameworks/base refactoring
create the new libandroidfw from parts of libui and libutils

Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
2012-02-20 22:38:43 -08:00