summaryrefslogtreecommitdiff
path: root/tools/validatekeymaps/Main.cpp
AgeCommit message (Collapse)Author
2020-12-22Add explicit Result::ok() where missingBernie Innocenti
This is part of a large-scale cleanup to remove operator bool() from android::base::expected. For more details, see aosp/1533001. Bug: 176148206 Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests Exempt-From-Owner-Approval: mechanical large-scale change Change-Id: Ie8cf279c20c9284ad6476280e80dc25545f833de
2020-11-04Convert validatekeymaps to enum classMichael Wright
Test: compiles Bug: 160010896 Change-Id: I4e582a442a267c2a35bea7a5d4fc7e080d281ecf
2020-11-04Convert KeyCharacterMap to enum classMichael Wright
Test: compiles Bug: 160010896 Change-Id: I178ef13f77279950db38174614f31044aa8096d3
2020-09-18Update usage of PropertyMap::loadSiarhei Vishniakou
Now that PropertyMap returns an owned object, update the usage in validatekeymaps. Bug: 163171599 Test: presubmit Change-Id: I75b9abe3fa1d418951a8c23a624771046a89b3f8
2020-09-08Merge "Move PropertyMap from libutils to libinput" am: bf37f0d136 am: ↵Treehugger Robot
27e25ee89e am: 3b71c8c742 am: 3faf298e70 am: 775215738b Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1419037 Change-Id: I47ffc1d0578763e1b00a2400d04087753d8082ac
2020-09-08Merge "Move PropertyMap from libutils to libinput" am: bf37f0d136Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1419037 Change-Id: I79f94c2c458d3314246cbe0980b28acac4d97cb4
2020-09-02Move PropertyMap from libutils to libinputSiarhei Vishniakou
Since PropertyMap has moved, update the #include directives. Bug: 163171599 Test: make only Change-Id: Ia12463cf80e4d47e0dcaf81104635b2717d28748
2020-08-30Move KeyCharacterMap from RefBase to shared_ptr.Chris Ye
Move KeyCharacterMap from RefBase and make it shared_ptr in it's owner class like EventHub and InputDeviceInfo. When loaded from file, KeyCharacterMap as shared_ptr is stored in both InputDeviceInfo and EventHub device. Bug: 160010896 Test: atest inputflinger, atest libinput_tests Change-Id: Ib3c489c3e87e04d68e4681994e430e43aa46164b
2020-08-28Move KeyLayoutMap from RefBase to shared_ptr.Chris Ye
Move KeyLayoutMap from inheriting RefBase and use shared_ptr to store in owner class like KeyMap. Bug: 160010896 Test: atest inputflinger, atest libinput_tests Change-Id: I5caca94bfc4a7e038729479a53f09a89d97a1c23
2019-06-21Remove 'no errors' logSiarhei Vishniakou
This log is redundant because "success" will already be printed at the end if the parsing has succeeded. Bug: none Test: validatekeymaps data/keyboards/Vendor_045e_Product_0b0c.kl Change-Id: I6e25b04d142d137101a6a9cca6e837ad35edb619
2019-02-20Update VirtualKeyMap usageSiarhei Vishniakou
Since the VirtualKeyMap has been refactored, updated the validation tool to use the new signature. Bug: 113575658 Test: atest libinput_tests inputflinger_tests Change-Id: Ifb0eb5b2913020f1e1402dcb6a36c9038c345807
2018-07-11Refactor String8 to std::string callsSiarhei Vishniakou
DisplayViewport::uniqueId is now std::string, so change the calls appropriately. Do some additional cleanups and conversions. This almost completely removes the dependency on String8. Test: build only Bug: 111108021 Change-Id: Ibbb6ca59e9061954d4a5fb930ef03d42cb0230db
2017-09-04Quiet keymap validation.Michael Wright
Adds a quiet option to validatekeyamps and uses it for the platform build. Bug: 35672363 Test: m -j12; see no messages about succesful keymap validation Change-Id: I902a9f5813ae612ee48ee3df210ae8fa2988c4b3
2014-01-27Revert "Move frameworks/base/tools/ to frameworks/tools/"Adam Lesinski
This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
2013-08-28Move frameworks/base/tools/ to frameworks/tools/Mike Lockwood
Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8
2013-07-01Move input library code to frameworks/native.Jeff Brown
No longer compile libandroidfw as a static library on the device since it already exists as a shared library. Keeping the static library would force us to provide a static library version of libinput for the device as well which doesn't make sense. Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
2012-04-17Support loading keyboard layout overlays from resources.Jeff Brown
Added the concept of a keyboard layout overlay, which is a key character map file that has "type OVERLAY". Added support for loading keyboard layout overlays from resources dynamically. The layouts are reloaded whenever they are changed in the Settings application or an application is installed. This is somewhat more aggressive than necessary so we might want to optimize it later. Before system-ready, the input system uses just the generic keyboard layouts that are included on the device system image. After system-ready, it considers the user's selected keyboard layout overlay and attempts to load it as necessary. We need to wait until system-ready before doing this because we need to be in a state where it is safe to start applications or access their resources. Bug: 6110399 Change-Id: Iae0886d3356649b0d2440aa00910a888cedd8323
2012-04-10Request key maps from input manager service.Jeff Brown
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-02-17Fix build break.Jeff Brown
Change-Id: I0bc8ac6e76ff28bd4c3585afbd6b3aa1930bf710
2011-02-19Add new axes for joysticks and mouse wheels.Jeff Brown
Added API on InputDevice to query the set of axes available. Added API on KeyEvent and MotionEvent to convert keycodes and axes to symbolic name strings for diagnostic purposes. Added API on KeyEvent to query if a given key code is a gamepad button. Added a new "axis" element to key layout files to specify the mapping between raw absolute axis values and motion axis ids. Expanded the axis bitfield to 64bits to allow for future growth. Modified the Makefile for keyboard prebuilts to run the keymap validation tool during the build. Added layouts for two game controllers. Added default actions for game pad button keys. Added more tests. Fixed a bunch of bugs. Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
2010-12-02Improve support for external keyboards.Jeff Brown
Use Vendor ID, Product ID and optionally the Version to locate keymaps and configuration files for external devices. Moved virtual key definition parsing to native code so that EventHub can identify touch screens with virtual keys and load the appropriate key layout file. Cleaned up a lot of old code in EventHub. Fixed a regression in ViewRoot's fallback event handling. Fixed a minor bug in FileMap that caused it to try to munmap or close invalid handled when released if the attempt to map the file failed. Added a couple of new String8 conveniences for formatting strings. Modified Tokenizer to fall back to open+read when mmap fails since we can't mmap sysfs files as needed to open the virtual key definition files in /sys/board_properties/. Change-Id: I6ca5e5f9547619fd082ddac47e87ce185da69ee6
2010-11-23Fix build on Linux due to different strrchr prototype.Jeff Brown
It seems Linux host build has a fancy strrchr overload that preserves constness. That's nice but it broke this. Change-Id: I3c9b57b9ce9abc5d334d1e7b2498a3248bd20a6a
2010-11-23Port Emulator keymaps.Jeff Brown
Also added a validation tool for keymaps (not currently integrated into the build system but getting there). This change brings back Android.mk with the intent that it will be used to validate keymaps in a later change. Added some missing keys that are present on phones. Bug: 3215210 Bug: 3225421 Change-Id: Id817c6e2215164616942c51a42752915d9ceacd3