We changed a piece of code in `framework / base / services / input / inputreader.cpp to right-click to move backward.
case BTN_RIGHT: mBtnRight = rawEvent->value; break;
to
case BTN_RIGHT: mBtnBack = rawEvent->value; break;
It receives all mouse events. When I click the right mouse button, it accepts motion events, as well as key events. But he cannot send key events.
His mistake:
D/InputDispatcher( 1229): dispatchKey - eventTime=1352984476958100000, deviceId=2, source=0x2002, policyFlags=0x42000000, action=0x1, flags=0x0, keyCode=0x4, scanCode=0x0, metaState=0x0, repeatCount=0, downTime=1352984476958100000 D/InputDispatcher( 1229): Waiting for application to become ready for input: AppWindowToken{41294900 token=Token{411c0f90 ActivityRecord{41301e68 com.android.calculator2/.Calculator}}} - Window{413ff3c0 com.android.calculator2/com.android.calculator2.Calculator paused=false}. Reason: Waiting because the focused window has not finished processing the input events that were previously delivered to it. D/InputDispatcher( 1229): findFocusedWindow finished: injectionResult=-1, timeSpentWaitingForApplication=0.0ms
Is this a mistake in jelly bean?
source share