Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9065504a authored by Jeff Brown's avatar Jeff Brown
Browse files

Improve support for external keyboards.

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
parent d6a46103
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2611,6 +2611,10 @@ public final class ViewRoot extends Handler implements ViewParent,
            captureKeyLog("captureDispatchKeyEvent", event);
        }

        // Make sure the fallback event policy sees all keys that will be delivered to the
        // view hierarchy.
        mFallbackEventHandler.preDispatchKeyEvent(event);

        // Deliver the key to the view hierarchy.
        if (mView.dispatchKeyEvent(event)) {
            finishKeyEvent(event, sendDone, true);
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
# limitations under the License.

#
# Logitech Revue keyboard
# Logitech Revue Wireless keyboard
#
# Notes:
# - The GRAVE key is emulated by the keyboard.
+11 −7
Original line number Diff line number Diff line
@@ -16,16 +16,20 @@
# Used by Android.mk and keyboards.mk.

keylayouts := \
    Apple_Wireless_Keyboard.kl \
    AVRCP.kl \
    Generic.kl \
    Logitech_USB_Receiver.kl \
    Motorola_Bluetooth_Wireless_Keyboard.kl \
    AVRCP.kl \
    qwerty.kl \
    qwerty2.kl
    Vendor_046d_Product_c532.kl \
    Vendor_05ac_Product_0239.kl \
    Vendor_22b8_Product_093d.kl

keycharmaps := \
    Generic.kcm \
    Virtual.kcm \
    qwerty.kcm \
    qwerty2.kcm \
    Virtual.kcm
    qwerty2.kcm

keyconfigs := \
    qwerty.idc \
    qwerty2.idc
Loading