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

Commit 61531231 authored by Steve Kondik's avatar Steve Kondik
Browse files

input: Handle extra keys on Vision and Espresso separately

These devices have physical keyboards, but certain keys (? and SYM) are
mapped differently. Check the target's name and use the appropriate
set of keycodes.

Change-Id: Ib91a47beb3681b411bbbd1946d5478334c5f3c33
parent c2f627a8
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ static const KeycodeLabel KEYCODES[] = {
    { "BUTTON_START", 108 },
    { "BUTTON_SELECT", 109 },
    { "BUTTON_MODE", 110 },
#if defined(VISION_KEYPAD)
    { "USER1", 92 },
    { "USER2", 93 },
    { "USER3", 94 },
@@ -149,7 +150,17 @@ static const KeycodeLabel KEYCODES[] = {
    { "FUNC_7", 103 },
    { "FUNC_8", 104 },
    { "QUECHAR", 105 },
    { "BTN_MOUSE", 106 },
#elif defined(LATTE_KEYPAD)
    { "FUNC_1", 92 },
    { "FUNC_2", 93 },
    { "FUNC_3", 94 },
    { "FUNC_4", 95 },
    { "FUNC_5", 96 },
    { "FUNC_6", 97 },
    { "FUNC_7", 98 },
    { "FUNC_8", 99 },
    { "QUECHAR", 100 },
#endif

    // NOTE: If you add a new keycode here you must also add it to several other files.
    //       Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
+6 −0
Original line number Diff line number Diff line
@@ -38,6 +38,12 @@ ifeq ($(TARGET_SIMULATOR),true)
    LOCAL_LDLIBS += -lpthread
endif

ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),espresso)
	LOCAL_CFLAGS += -DLATTE_KEYPAD
else ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),vision)
	LOCAL_CFLAGS += -DVISION_KEYPAD
endif

include $(BUILD_SHARED_LIBRARY)