定义menu
frameworks/native/include/android/input.h/* Constants that identify buttons that are associated with motion events.* Refer to the documentation on the MotionEvent class for descriptions of each button.*/
enum {/ primary */AMOTION_EVENT_BUTTON_PRIMARY = 1 << 0,/ secondary */AMOTION_EVENT_BUTTON_SECONDARY = 1 << 1,/ tertiary */AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2,/ back */AMOTION_EVENT_BUTTON_BACK = 1 << 3,/ forward */AMOTION_EVENT_BUTTON_FORWARD = 1 << 4,AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5,AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6,AMTION_EVENT_BUTTON_MENU = 1 << 7, //menu by qhj ++
};
frameworks/native/services/inputflinger/reader/mapper/TouchCursorInputMapperCommon.hstatic void synthesizeButtonKeys(InputReaderContext* context, int32_t action, nsecs_t when,int32_t deviceId, uint32_t source, int32_t displayId,uint32_t policyFlags, int32_t lastButtonState,int32_t currentButtonState) {synthesizeButtonKey(context, action, when, deviceId, source, displayId, policyFlags,lastButtonState, currentButtonState, AMOTION_EVENT_BUTTON_BACK,AKEYCODE_BACK);synthesizeButtonKey(context, action, when, deviceId, source, displayId, policyFlags,lastButtonState, currentButtonState, AMOTION_EVENT_BUTTON_FORWARD,AKEYCODE_FORWARD);synthesizeButtonKey(context, action, when, deviceId, source, displayId, policyFlags,lastButtonState, currentButtonState, AMTION_EVENT_BUTTON_MENU, AKEYCODE_MENU);//menu ++ by qhj}