Lines Matching refs:keyEvent
3922 KeyEvent event = (KeyEvent)msg.obj;
3923 if ((event.getFlags()&KeyEvent.FLAG_FROM_SYSTEM) != 0) {
3927 event = KeyEvent.changeFlags(event, event.getFlags() &
3928 ~KeyEvent.FLAG_FROM_SYSTEM);
4238 if (event instanceof KeyEvent) {
4239 return ((KeyEvent) event).getKeyCode() == KeyEvent.KEYCODE_BACK;
4405 if (mInputQueue != null && q.mEvent instanceof KeyEvent) {
4434 if (q.mEvent instanceof KeyEvent) {
4441 final KeyEvent event = (KeyEvent)q.mEvent;
4501 if (q.mEvent instanceof KeyEvent) {
4513 final KeyEvent event = (KeyEvent)q.mEvent;
4604 if (q.mEvent instanceof KeyEvent) {
4630 private boolean performFocusNavigation(KeyEvent event) {
4633 case KeyEvent.KEYCODE_DPAD_LEFT:
4638 case KeyEvent.KEYCODE_DPAD_RIGHT:
4643 case KeyEvent.KEYCODE_DPAD_UP:
4648 case KeyEvent.KEYCODE_DPAD_DOWN:
4653 case KeyEvent.KEYCODE_TAB:
4656 } else if (event.hasModifiers(KeyEvent.META_SHIFT_ON)) {
4730 final KeyEvent event = (KeyEvent)q.mEvent;
4743 if (event.getAction() == KeyEvent.ACTION_DOWN
4744 && event.getKeyCode() == KeyEvent.KEYCODE_TAB) {
4745 if (KeyEvent.metaStateHasModifiers(event.getMetaState(), KeyEvent.META_META_ON)) {
4747 } else if (KeyEvent.metaStateHasModifiers(event.getMetaState(),
4748 KeyEvent.META_META_ON | KeyEvent.META_SHIFT_ON)) {
4754 if (event.getAction() == KeyEvent.ACTION_DOWN
4755 && !KeyEvent.metaStateHasNoModifiers(event.getMetaState())
4757 && !KeyEvent.isModifierKey(event.getKeyCode())
4776 if (event.getAction() == KeyEvent.ACTION_DOWN) {
4944 mKeyboard.process((KeyEvent)q.mEvent);
4997 KeyEvent(curTime, curTime,
4998 KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_CENTER, 0, metaState,
4999 KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
5005 enqueueInputEvent(new KeyEvent(curTime, curTime,
5006 KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_CENTER, 0, metaState,
5007 KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
5033 keycode = movement > 0 ? KeyEvent.KEYCODE_DPAD_RIGHT
5034 : KeyEvent.KEYCODE_DPAD_LEFT;
5041 keycode = movement > 0 ? KeyEvent.KEYCODE_DPAD_DOWN
5042 : KeyEvent.KEYCODE_DPAD_UP;
5059 enqueueInputEvent(new KeyEvent(curTime, curTime,
5060 KeyEvent.ACTION_MULTIPLE, keycode, repeatCount, metaState,
5061 KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
5069 enqueueInputEvent(new KeyEvent(curTime, curTime,
5070 KeyEvent.ACTION_DOWN, keycode, 0, metaState,
5071 KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
5073 enqueueInputEvent(new KeyEvent(curTime, curTime,
5074 KeyEvent.ACTION_UP, keycode, 0, metaState,
5075 KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
5284 KeyEvent oldEvent = (KeyEvent)msg.obj;
5285 KeyEvent e = KeyEvent.changeTimeRepeat(oldEvent,
5338 enqueueInputEvent(new KeyEvent(time, time,
5339 KeyEvent.ACTION_UP, mLastXKeyCode, 0, metaState,
5340 deviceId, 0, KeyEvent.FLAG_FALLBACK, source));
5348 ? KeyEvent.KEYCODE_DPAD_RIGHT : KeyEvent.KEYCODE_DPAD_LEFT;
5349 final KeyEvent e = new KeyEvent(time, time,
5350 KeyEvent.ACTION_DOWN, mLastXKeyCode, 0, metaState,
5351 deviceId, 0, KeyEvent.FLAG_FALLBACK, source);
5362 enqueueInputEvent(new KeyEvent(time, time,
5363 KeyEvent.ACTION_UP, mLastYKeyCode, 0, metaState,
5364 KeyEvent.FLAG_FALLBACK, source));
5372 ? KeyEvent.KEYCODE_DPAD_DOWN : KeyEvent.KEYCODE_DPAD_UP;
5373 final KeyEvent e = new KeyEvent(time, time,
5374 KeyEvent.ACTION_DOWN, mLastYKeyCode, 0, metaState,
5375 deviceId, 0, KeyEvent.FLAG_FALLBACK, source);
5472 private int mPendingKeyCode = KeyEvent.KEYCODE_UNKNOWN;
5585 if (mConsumedMovement && mPendingKeyCode != KeyEvent.KEYCODE_UNKNOWN) {
5635 KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_RIGHT);
5642 KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_DOWN);
5680 enqueueInputEvent(new KeyEvent(mPendingKeyDownTime, time,
5681 KeyEvent.ACTION_DOWN, mPendingKeyCode, mPendingKeyRepeatCount,
5683 KeyEvent.FLAG_FALLBACK, mCurrentSource));
5687 if (mPendingKeyCode != KeyEvent.KEYCODE_UNKNOWN) {
5692 enqueueInputEvent(new KeyEvent(mPendingKeyDownTime, time,
5693 KeyEvent.ACTION_UP, mPendingKeyCode, 0, mPendingKeyMetaState,
5694 mCurrentDeviceId, 0, KeyEvent.FLAG_FALLBACK,
5696 mPendingKeyCode = KeyEvent.KEYCODE_UNKNOWN;
5708 case KeyEvent.KEYCODE_DPAD_LEFT:
5716 case KeyEvent.KEYCODE_DPAD_RIGHT:
5724 case KeyEvent.KEYCODE_DPAD_UP:
5732 case KeyEvent.KEYCODE_DPAD_DOWN:
5785 public void process(KeyEvent event) {
5786 if ((event.getFlags() & KeyEvent.FLAG_FALLBACK) != 0) {
5798 final int flags = event.getFlags() | KeyEvent.FLAG_FALLBACK;
5799 KeyEvent fallbackEvent = KeyEvent.obtain(
5813 * @param keyEvent The key event.
5816 private static boolean isNavigationKey(KeyEvent keyEvent) {
5817 switch (keyEvent.getKeyCode()) {
5818 case KeyEvent.KEYCODE_DPAD_LEFT:
5819 case KeyEvent.KEYCODE_DPAD_RIGHT:
5820 case KeyEvent.KEYCODE_DPAD_UP:
5821 case KeyEvent.KEYCODE_DPAD_DOWN:
5822 case KeyEvent.KEYCODE_DPAD_CENTER:
5823 case KeyEvent.KEYCODE_PAGE_UP:
5824 case KeyEvent.KEYCODE_PAGE_DOWN:
5825 case KeyEvent.KEYCODE_MOVE_HOME:
5826 case KeyEvent.KEYCODE_MOVE_END:
5827 case KeyEvent.KEYCODE_TAB:
5828 case KeyEvent.KEYCODE_SPACE:
5829 case KeyEvent.KEYCODE_ENTER:
5837 * @param keyEvent The key event.
5840 private static boolean isTypingKey(KeyEvent keyEvent) {
5841 return keyEvent.getUnicodeChar() > 0;
5850 private boolean checkForLeavingTouchModeAndConsume(KeyEvent event) {
5858 if (action != KeyEvent.ACTION_DOWN && action != KeyEvent.ACTION_MULTIPLE) {
5863 if ((event.getFlags() & KeyEvent.FLAG_KEEP_TOUCH_MODE) != 0) {
6695 if (event instanceof KeyEvent) {
6696 final KeyEvent keyEvent = (KeyEvent)event;
6697 return keyEvent.getAction() == KeyEvent.ACTION_UP;
6935 public void dispatchKeyFromIme(KeyEvent event) {