index f2befa9..6635e94 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -405,6 +405,7 @@ enum {
AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2,
AMOTION_EVENT_BUTTON_BACK = 1 << 3,
AMOTION_EVENT_BUTTON_FORWARD = 1 << 4,
+ AMOTION_EVENT_BUTTON_MENU = 1 << 5,
};
/*
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp
index 1b869e1..602332c 100644
--- a/services/input/InputReader.cpp
+++ b/services/input/InputReader.cpp
@@ -199,6 +199,10 @@ static void synthesizeButtonKeys(InputReaderContext* context, int32_t action,
synthesizeButtonKey(context, action, when, deviceId, source, policyFlags,
lastButtonState, currentButtonState,
AMOTION_EVENT_BUTTON_FORWARD, AKEYCODE_FORWARD);
+ synthesizeButtonKey(context, action, when, deviceId, source, policyFlags,
+ lastButtonState, currentButtonState,
+ AMOTION_EVENT_BUTTON_MENU, AKEYCODE_MENU);
+
}
@@ -1158,7 +1162,8 @@ uint32_t CursorButtonAccumulator::getButtonState() const {
result |= AMOTION_EVENT_BUTTON_PRIMARY;
}
if (mBtnRight) {
- result |= AMOTION_EVENT_BUTTON_SECONDARY;
+// result |= AMOTION_EVENT_BUTTON_SECONDARY;
+ result |= AMOTION_EVENT_BUTTON_MENU;
}
if (mBtnMiddle) {
result |= AMOTION_EVENT_BUTTON_TERTIARY;
@@ -2399,13 +2404,6 @@ void CursorInputMapper::process(const RawEvent* rawEvent) {
mCursorMotionAccumulator.process(rawEvent);