/frameworks/base/core/java/android/hardware/input/ |
D | VirtualKeyEvent.java | 26 import android.view.KeyEvent; 47 public static final int ACTION_DOWN = KeyEvent.ACTION_DOWN; 49 public static final int ACTION_UP = KeyEvent.ACTION_UP; 66 KeyEvent.KEYCODE_0, 67 KeyEvent.KEYCODE_1, 68 KeyEvent.KEYCODE_2, 69 KeyEvent.KEYCODE_3, 70 KeyEvent.KEYCODE_4, 71 KeyEvent.KEYCODE_5, 72 KeyEvent.KEYCODE_6, [all …]
|
D | PhysicalKeyLayout.java | 24 import android.view.KeyEvent; 87 DEFAULT_KEYCODE_FOR_SCANCODE.put(SCANCODE_1, KeyEvent.KEYCODE_1); in DEFAULT_KEYCODE_FOR_SCANCODE.put() 88 DEFAULT_KEYCODE_FOR_SCANCODE.put(SCANCODE_2, KeyEvent.KEYCODE_2); in DEFAULT_KEYCODE_FOR_SCANCODE.put() 89 DEFAULT_KEYCODE_FOR_SCANCODE.put(SCANCODE_3, KeyEvent.KEYCODE_3); in DEFAULT_KEYCODE_FOR_SCANCODE.put() 90 DEFAULT_KEYCODE_FOR_SCANCODE.put(SCANCODE_4, KeyEvent.KEYCODE_4); in DEFAULT_KEYCODE_FOR_SCANCODE.put() 91 DEFAULT_KEYCODE_FOR_SCANCODE.put(SCANCODE_5, KeyEvent.KEYCODE_5); in DEFAULT_KEYCODE_FOR_SCANCODE.put() 92 DEFAULT_KEYCODE_FOR_SCANCODE.put(SCANCODE_6, KeyEvent.KEYCODE_6); in DEFAULT_KEYCODE_FOR_SCANCODE.put() 93 DEFAULT_KEYCODE_FOR_SCANCODE.put(SCANCODE_7, KeyEvent.KEYCODE_7); in DEFAULT_KEYCODE_FOR_SCANCODE.put() 94 DEFAULT_KEYCODE_FOR_SCANCODE.put(SCANCODE_8, KeyEvent.KEYCODE_8); in DEFAULT_KEYCODE_FOR_SCANCODE.put() 95 DEFAULT_KEYCODE_FOR_SCANCODE.put(SCANCODE_9, KeyEvent.KEYCODE_9); in DEFAULT_KEYCODE_FOR_SCANCODE.put() [all …]
|
/frameworks/base/services/tests/wmtests/src/com/android/server/policy/ |
D | ShortcutLoggingTests.java | 29 import android.view.KeyEvent; 56 private static final int META_KEY = KeyEvent.KEYCODE_META_LEFT; 57 private static final int META_ON = MODIFIER.get(KeyEvent.KEYCODE_META_LEFT); 58 private static final int ALT_KEY = KeyEvent.KEYCODE_ALT_LEFT; 59 private static final int ALT_ON = MODIFIER.get(KeyEvent.KEYCODE_ALT_LEFT); 60 private static final int CTRL_KEY = KeyEvent.KEYCODE_CTRL_LEFT; 61 private static final int CTRL_ON = MODIFIER.get(KeyEvent.KEYCODE_CTRL_LEFT); 62 private static final int SHIFT_KEY = KeyEvent.KEYCODE_SHIFT_LEFT; 63 private static final int SHIFT_ON = MODIFIER.get(KeyEvent.KEYCODE_SHIFT_LEFT); 69 {"Meta + H -> Open Home", new int[]{META_KEY, KeyEvent.KEYCODE_H}, in shortcutTestArguments() [all …]
|
D | ShortcutKeyTestBase.java | 19 import static android.view.KeyEvent.KEYCODE_ALT_LEFT; 20 import static android.view.KeyEvent.KEYCODE_ALT_RIGHT; 21 import static android.view.KeyEvent.KEYCODE_CTRL_LEFT; 22 import static android.view.KeyEvent.KEYCODE_CTRL_RIGHT; 23 import static android.view.KeyEvent.KEYCODE_META_LEFT; 24 import static android.view.KeyEvent.KEYCODE_META_RIGHT; 25 import static android.view.KeyEvent.KEYCODE_SHIFT_LEFT; 26 import static android.view.KeyEvent.KEYCODE_SHIFT_RIGHT; 27 import static android.view.KeyEvent.META_ALT_LEFT_ON; 28 import static android.view.KeyEvent.META_ALT_ON; [all …]
|
D | DeferredKeyActionExecutorTests.java | 22 import android.view.KeyEvent; 45 mKeyActionExecutor.queueKeyAction(KeyEvent.KEYCODE_STEM_PRIMARY, /* downTime= */ 1, action); in queueKeyAction_actionNotExecuted() 53 mKeyActionExecutor.queueKeyAction(KeyEvent.KEYCODE_STEM_PRIMARY, /* downTime= */ 1, action); in setActionsExecutable_afterActionQueued_actionExecuted() 55 mKeyActionExecutor.setActionsExecutable(KeyEvent.KEYCODE_STEM_PRIMARY, /* downTime= */ 1); in setActionsExecutable_afterActionQueued_actionExecuted() 63 mKeyActionExecutor.setActionsExecutable(KeyEvent.KEYCODE_STEM_PRIMARY, /* downTime= */ 1); in queueKeyAction_alreadyExecutable_actionExecuted() 65 mKeyActionExecutor.queueKeyAction(KeyEvent.KEYCODE_STEM_PRIMARY, /* downTime= */ 1, action); in queueKeyAction_alreadyExecutable_actionExecuted() 74 KeyEvent.KEYCODE_STEM_PRIMARY, /* downTime= */ 1, action1); in setActionsExecutable_afterActionQueued_downTimeMismatch_actionNotExecuted() 76 mKeyActionExecutor.setActionsExecutable(KeyEvent.KEYCODE_STEM_PRIMARY, /* downTime= */ 2); in setActionsExecutable_afterActionQueued_downTimeMismatch_actionNotExecuted() 82 KeyEvent.KEYCODE_STEM_PRIMARY, /* downTime= */ 2, action2); in setActionsExecutable_afterActionQueued_downTimeMismatch_actionNotExecuted() 91 mKeyActionExecutor.setActionsExecutable(KeyEvent.KEYCODE_STEM_PRIMARY, /* downTime= */ 1); in queueKeyAction_afterSetExecutable_downTimeMismatch_actionNotExecuted() [all …]
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ |
D | KeyEventHandling.java | 21 import android.view.KeyEvent; 25 import static android.view.KeyEvent.KEYCODE_0; 26 import static android.view.KeyEvent.KEYCODE_1; 27 import static android.view.KeyEvent.KEYCODE_2; 28 import static android.view.KeyEvent.KEYCODE_3; 29 import static android.view.KeyEvent.KEYCODE_4; 30 import static android.view.KeyEvent.KEYCODE_5; 31 import static android.view.KeyEvent.KEYCODE_6; 32 import static android.view.KeyEvent.KEYCODE_7; 33 import static android.view.KeyEvent.KEYCODE_8; [all …]
|
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/ |
D | EditTextInputActivity.java | 23 import android.view.KeyEvent; 79 KeyEvent.KEYCODE_A, in onCreate() 80 KeyEvent.KEYCODE_B, in onCreate() 81 KeyEvent.KEYCODE_C, in onCreate() 82 KeyEvent.KEYCODE_D, in onCreate() 83 KeyEvent.KEYCODE_E, in onCreate() 84 KeyEvent.KEYCODE_F, in onCreate() 85 KeyEvent.KEYCODE_G, in onCreate() 86 KeyEvent.KEYCODE_H, in onCreate() 87 KeyEvent.KEYCODE_I, in onCreate() [all …]
|
/frameworks/base/services/tests/InputMethodSystemServerTests/test-apps/SimpleTestIme/src/com/android/apps/inputmethod/simpleime/ |
D | KeyCodeConstants.java | 19 import android.view.KeyEvent; 30 KEY_NAME_TO_CODE_MAP.put("KEYCODE_A", KeyEvent.KEYCODE_A); 31 KEY_NAME_TO_CODE_MAP.put("KEYCODE_B", KeyEvent.KEYCODE_B); 32 KEY_NAME_TO_CODE_MAP.put("KEYCODE_C", KeyEvent.KEYCODE_C); 33 KEY_NAME_TO_CODE_MAP.put("KEYCODE_D", KeyEvent.KEYCODE_D); 34 KEY_NAME_TO_CODE_MAP.put("KEYCODE_E", KeyEvent.KEYCODE_E); 35 KEY_NAME_TO_CODE_MAP.put("KEYCODE_F", KeyEvent.KEYCODE_F); 36 KEY_NAME_TO_CODE_MAP.put("KEYCODE_G", KeyEvent.KEYCODE_G); 37 KEY_NAME_TO_CODE_MAP.put("KEYCODE_H", KeyEvent.KEYCODE_H); 38 KEY_NAME_TO_CODE_MAP.put("KEYCODE_I", KeyEvent.KEYCODE_I); [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
D | DatePickerFocusTest.java | 23 import android.view.KeyEvent; 66 sendKey(KeyEvent.KEYCODE_TAB); in testFocusTravel() 68 sendKey(KeyEvent.KEYCODE_TAB); in testFocusTravel() 70 sendKey(KeyEvent.KEYCODE_TAB); in testFocusTravel() 72 sendKey(KeyEvent.KEYCODE_TAB); in testFocusTravel() 74 sendShiftKey(KeyEvent.KEYCODE_TAB); in testFocusTravel() 76 sendShiftKey(KeyEvent.KEYCODE_TAB); in testFocusTravel() 78 sendShiftKey(KeyEvent.KEYCODE_TAB); in testFocusTravel() 80 sendShiftKey(KeyEvent.KEYCODE_TAB); in testFocusTravel() 100 final KeyEvent shiftDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_SHIFT_LEFT); in sendShiftKey() [all …]
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | KeyUtils.java | 22 import android.view.KeyEvent; 42 inst.sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MENU)); in tapMenuKey() 43 inst.sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MENU)); in tapMenuKey() 55 final KeyEvent pushMenuKey = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MENU); in chordMenuKey() 57 final KeyEvent shortcutKeyEvent = keyCharMap.getEvents(new char[] { shortcutKey })[0]; in chordMenuKey() 61 inst.sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, shortcutKeyCode)); in chordMenuKey() 62 inst.sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, shortcutKeyCode)); in chordMenuKey() 63 inst.sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MENU)); in chordMenuKey() 74 inst.sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_CENTER)); in longClick() 80 inst.sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_CENTER)); in longClick() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
D | KeyboardInterceptorTest.java | 32 import android.view.KeyEvent; 77 KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_0); in whenNonspecialKeyArrives_withNothingInQueue_eventGoesToAms() 84 KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_VOLUME_DOWN); in whenVolumeKeyArrives_andPolicySaysUseIt_eventGoesToAms() 93 KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_VOLUME_UP); in whenVolumeKeyArrives_andPolicySaysDropIt_eventDropped() 103 KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_VOLUME_UP); in whenVolumeKeyArrives_andPolicySaysDelayThenUse_eventQueuedThenSentToAms() 120 KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_VOLUME_DOWN); in whenVolumeKeyArrives_andPolicySaysDelayThenDrop_eventQueuedThenDropped() 137 KeyEvent[] events = {new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_0), in whenSomeEventsGetDelayed_allEventsStillInOrder() 138 new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_VOLUME_UP), in whenSomeEventsGetDelayed_allEventsStillInOrder() 139 new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_A), in whenSomeEventsGetDelayed_allEventsStillInOrder() 140 new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_VOLUME_UP), in whenSomeEventsGetDelayed_allEventsStillInOrder() [all …]
|
/frameworks/base/services/core/java/com/android/server/hdmi/ |
D | HdmiCecKeycode.java | 19 import android.view.KeyEvent; 246 new KeycodeEntry(KeyEvent.KEYCODE_DPAD_CENTER, CEC_KEYCODE_SELECT), 247 new KeycodeEntry(KeyEvent.KEYCODE_DPAD_UP, CEC_KEYCODE_UP), 248 new KeycodeEntry(KeyEvent.KEYCODE_DPAD_DOWN, CEC_KEYCODE_DOWN), 249 new KeycodeEntry(KeyEvent.KEYCODE_DPAD_LEFT, CEC_KEYCODE_LEFT), 250 new KeycodeEntry(KeyEvent.KEYCODE_DPAD_RIGHT, CEC_KEYCODE_RIGHT), 262 new KeycodeEntry(KeyEvent.KEYCODE_HOME, CEC_KEYCODE_ROOT_MENU), 263 new KeycodeEntry(KeyEvent.KEYCODE_MENU, CEC_KEYCODE_ROOT_MENU), 264 new KeycodeEntry(KeyEvent.KEYCODE_SETTINGS, CEC_KEYCODE_SETUP_MENU), 265 new KeycodeEntry(KeyEvent.KEYCODE_TV_CONTENTS_MENU, CEC_KEYCODE_CONTENTS_MENU, false), [all …]
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | PhoneFallbackEventHandler.java | 34 import android.view.KeyEvent; 64 public void preDispatchKeyEvent(KeyEvent event) { in preDispatchKeyEvent() 68 public boolean dispatchKeyEvent(KeyEvent event) { in dispatchKeyEvent() 73 if (action == KeyEvent.ACTION_DOWN) { in dispatchKeyEvent() 81 boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() 86 final KeyEvent.DispatcherState dispatcher = mView.getKeyDispatcherState(); in onKeyDown() 89 case KeyEvent.KEYCODE_VOLUME_UP: in onKeyDown() 90 case KeyEvent.KEYCODE_VOLUME_DOWN: in onKeyDown() 91 case KeyEvent.KEYCODE_VOLUME_MUTE: { in onKeyDown() 97 case KeyEvent.KEYCODE_MEDIA_PLAY: in onKeyDown() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/listview/ |
D | ListScrollListenerTest.java | 22 import android.view.KeyEvent; 67 inst.sendCharacterSync(KeyEvent.KEYCODE_DPAD_DOWN); in testKeyScrolling() 73 KeyEvent upDown = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN, in testKeyScrolling() 74 KeyEvent.KEYCODE_DPAD_UP, 0, KeyEvent.META_ALT_ON); in testKeyScrolling() 75 KeyEvent upUp = new KeyEvent(0, 0, KeyEvent.ACTION_UP, in testKeyScrolling() 76 KeyEvent.KEYCODE_DPAD_UP, 0, KeyEvent.META_ALT_ON); in testKeyScrolling() 83 KeyEvent down = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN, in testKeyScrolling() 84 KeyEvent.KEYCODE_DPAD_DOWN, 0, KeyEvent.META_ALT_ON); in testKeyScrolling() 85 KeyEvent up = new KeyEvent(0, 0, KeyEvent.ACTION_UP, in testKeyScrolling() 86 KeyEvent.KEYCODE_DPAD_DOWN, 0, KeyEvent.META_ALT_ON); in testKeyScrolling()
|
/frameworks/base/core/tests/coretests/src/android/widget/gridview/ |
D | GridScrollListenerTest.java | 22 import android.view.KeyEvent; 67 inst.sendCharacterSync(KeyEvent.KEYCODE_DPAD_DOWN); in testKeyScrolling() 74 KeyEvent upDown = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN, in testKeyScrolling() 75 KeyEvent.KEYCODE_DPAD_UP, 0, KeyEvent.META_ALT_ON); in testKeyScrolling() 76 KeyEvent upUp = new KeyEvent(0, 0, KeyEvent.ACTION_UP, in testKeyScrolling() 77 KeyEvent.KEYCODE_DPAD_UP, 0, KeyEvent.META_ALT_ON); in testKeyScrolling() 85 KeyEvent down = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN, in testKeyScrolling() 86 KeyEvent.KEYCODE_DPAD_DOWN, 0, KeyEvent.META_ALT_ON); in testKeyScrolling() 87 KeyEvent up = new KeyEvent(0, 0, KeyEvent.ACTION_UP, in testKeyScrolling() 88 KeyEvent.KEYCODE_DPAD_DOWN, 0, KeyEvent.META_ALT_ON); in testKeyScrolling()
|
/frameworks/base/core/java/android/view/ |
D | KeyEvent.java | 97 public class KeyEvent extends InputEvent implements Parcelable { class 1451 private static KeyEvent gRecyclerTop; 1453 private KeyEvent mNext; 1506 boolean onKeyDown(int keyCode, KeyEvent event); in onKeyDown() 1522 boolean onKeyLongPress(int keyCode, KeyEvent event); in onKeyLongPress() 1533 boolean onKeyUp(int keyCode, KeyEvent event); in onKeyUp() 1547 boolean onKeyMultiple(int keyCode, int count, KeyEvent event); in onKeyMultiple() 1554 private KeyEvent() { in KeyEvent() method in KeyEvent 1567 public KeyEvent(int action, int code) { in KeyEvent() method in KeyEvent 1586 public KeyEvent(long downTime, long eventTime, int action, in KeyEvent() method in KeyEvent [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyevent/domain/interactor/ |
D | SysUIKeyEventHandlerTest.kt | 19 import android.view.KeyEvent 62 val backKeyEventActionDown = KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK) in dispatchBackKey_notHandledByKeyguardKeyEventInteractor_handledByBackActionInteractor() 63 val backKeyEventActionUp = KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK) in dispatchBackKey_notHandledByKeyguardKeyEventInteractor_handledByBackActionInteractor() 85 KeyEvent( in dispatchKeyEvent_isNotHandledByKeyguardKeyEventInteractor() 86 KeyEvent.ACTION_UP, in dispatchKeyEvent_isNotHandledByKeyguardKeyEventInteractor() 87 KeyEvent.KEYCODE_SPACE, in dispatchKeyEvent_isNotHandledByKeyguardKeyEventInteractor() 96 KeyEvent( in dispatchKeyEvent_handledByKeyguardKeyEventInteractor() 97 KeyEvent.ACTION_UP, in dispatchKeyEvent_handledByKeyguardKeyEventInteractor() 98 KeyEvent.KEYCODE_SPACE, in dispatchKeyEvent_handledByKeyguardKeyEventInteractor() 107 KeyEvent( in interceptMediaKey_isNotHandledByKeyguardKeyEventInteractor() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | KeyboardShortcuts.java | 52 import android.view.KeyEvent; 94 KeyEvent.META_META_ON, KeyEvent.META_CTRL_ON, KeyEvent.META_ALT_ON, 95 KeyEvent.META_SHIFT_ON, KeyEvent.META_SYM_ON, KeyEvent.META_FUNCTION_ON 196 KeyEvent.KEYCODE_HOME, context.getString(R.string.keyboard_key_home)); in loadResources() 198 KeyEvent.KEYCODE_BACK, context.getString(R.string.keyboard_key_back)); in loadResources() 200 KeyEvent.KEYCODE_DPAD_UP, context.getString(R.string.keyboard_key_dpad_up)); in loadResources() 202 KeyEvent.KEYCODE_DPAD_DOWN, context.getString(R.string.keyboard_key_dpad_down)); in loadResources() 204 KeyEvent.KEYCODE_DPAD_LEFT, context.getString(R.string.keyboard_key_dpad_left)); in loadResources() 206 KeyEvent.KEYCODE_DPAD_RIGHT, context.getString(R.string.keyboard_key_dpad_right)); in loadResources() 208 KeyEvent.KEYCODE_DPAD_CENTER, context.getString(R.string.keyboard_key_dpad_center)); in loadResources() [all …]
|
D | KeyboardShortcutListSearch.java | 56 import android.view.KeyEvent; 137 KeyEvent.META_META_ON, KeyEvent.META_CTRL_ON, KeyEvent.META_ALT_ON, 138 KeyEvent.META_SHIFT_ON, KeyEvent.META_SYM_ON, KeyEvent.META_FUNCTION_ON 211 KeyEvent.KEYCODE_HOME, context.getString(R.string.keyboard_key_home)); in loadResources() 213 KeyEvent.KEYCODE_BACK, context.getString(R.string.keyboard_key_back)); in loadResources() 215 KeyEvent.KEYCODE_DPAD_UP, context.getString(R.string.keyboard_key_dpad_up)); in loadResources() 217 KeyEvent.KEYCODE_DPAD_DOWN, context.getString(R.string.keyboard_key_dpad_down)); in loadResources() 219 KeyEvent.KEYCODE_DPAD_LEFT, context.getString(R.string.keyboard_key_dpad_left)); in loadResources() 221 KeyEvent.KEYCODE_DPAD_RIGHT, context.getString(R.string.keyboard_key_dpad_right)); in loadResources() 223 KeyEvent.KEYCODE_DPAD_CENTER, context.getString(R.string.keyboard_key_dpad_center)); in loadResources() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | KeyEventTest.java | 47 private static final int ACTION = KeyEvent.ACTION_DOWN; 48 private static final int ANOTHER_ACTION = KeyEvent.ACTION_UP; 49 private static final int KEYCODE = KeyEvent.KEYCODE_0; 65 KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT, in testObtain() 73 KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT, in testObtainFromKeyEvent() 75 KeyEvent keyEvent2 = KeyEvent.obtain(keyEvent); in testObtainFromKeyEvent() 83 KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT, in testObtainWithDisplayId() 99 KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT, in testObtainGeneratesUniqueId() 111 KeyEvent keyEvent = new KeyEvent(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT); in testConstructorGeneratesUniqueId() 121 KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT, in testObtainGeneratesIdWithRightSource() [all …]
|
/frameworks/base/services/core/java/com/android/server/media/ |
D | MediaKeyDispatcher.java | 27 import android.view.KeyEvent; 66 mOverriddenKeyEvents.put(KeyEvent.KEYCODE_MEDIA_PLAY, 0); in MediaKeyDispatcher() 67 mOverriddenKeyEvents.put(KeyEvent.KEYCODE_MEDIA_PAUSE, 0); in MediaKeyDispatcher() 68 mOverriddenKeyEvents.put(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, 0); in MediaKeyDispatcher() 69 mOverriddenKeyEvents.put(KeyEvent.KEYCODE_MUTE, 0); in MediaKeyDispatcher() 70 mOverriddenKeyEvents.put(KeyEvent.KEYCODE_HEADSETHOOK, 0); in MediaKeyDispatcher() 71 mOverriddenKeyEvents.put(KeyEvent.KEYCODE_MEDIA_STOP, 0); in MediaKeyDispatcher() 72 mOverriddenKeyEvents.put(KeyEvent.KEYCODE_MEDIA_NEXT, 0); in MediaKeyDispatcher() 73 mOverriddenKeyEvents.put(KeyEvent.KEYCODE_MEDIA_PREVIOUS, 0); in MediaKeyDispatcher() 74 mOverriddenKeyEvents.put(KeyEvent.KEYCODE_VOLUME_DOWN, 0); in MediaKeyDispatcher() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/ |
D | TimeLimitedInputEventBufferTest.java | 23 import android.view.KeyEvent; 97 KeyEvent eventA = KeyEvent.obtain(0, 0, MotionEvent.ACTION_DOWN, KeyEvent.KEYCODE_A, 0, 0, in testKeyEventAllEventsRetained() 99 KeyEvent eventB = KeyEvent.obtain(0, 3, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_A, 0, 0, 0, 0, in testKeyEventAllEventsRetained() 110 KeyEvent eventA = KeyEvent.obtain(0, 0, MotionEvent.ACTION_DOWN, KeyEvent.KEYCODE_A, 0, 0, in testKeyEventOlderEventsRemoved() 112 KeyEvent eventB = KeyEvent.obtain(0, 1, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_A, 0, 0, 0, 0, in testKeyEventOlderEventsRemoved() 114 KeyEvent eventC = KeyEvent.obtain(0, MAX_AGE_MS + 1, MotionEvent.ACTION_DOWN, in testKeyEventOlderEventsRemoved() 115 KeyEvent.KEYCODE_A, 0, 0, 0, 0, 0, 0, 0, ""); in testKeyEventOlderEventsRemoved() 116 KeyEvent eventD = KeyEvent.obtain(0, MAX_AGE_MS + 2, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_A, in testKeyEventOlderEventsRemoved()
|
/frameworks/base/media/lib/tvremote/java/com/android/media/tv/remoteprovider/ |
D | TvRemoteProvider.java | 29 import android.view.KeyEvent; 54 KeyEvent.KEYCODE_BUTTON_A, 55 KeyEvent.KEYCODE_BUTTON_B, 56 KeyEvent.KEYCODE_BUTTON_X, 57 KeyEvent.KEYCODE_BUTTON_Y, 58 KeyEvent.KEYCODE_BUTTON_L1, 59 KeyEvent.KEYCODE_BUTTON_L2, 60 KeyEvent.KEYCODE_BUTTON_R1, 61 KeyEvent.KEYCODE_BUTTON_R2, 62 KeyEvent.KEYCODE_BUTTON_SELECT, [all …]
|
/frameworks/base/core/java/android/text/method/ |
D | BaseMovementMethod.java | 23 import android.view.KeyEvent; 41 public boolean onKeyDown(TextView widget, Spannable text, int keyCode, KeyEvent event) { in onKeyDown() 52 public boolean onKeyOther(TextView widget, Spannable text, KeyEvent event) { in onKeyOther() 55 if (keyCode != KeyEvent.KEYCODE_UNKNOWN in onKeyOther() 56 && event.getAction() == KeyEvent.ACTION_MULTIPLE) { in onKeyOther() 75 public boolean onKeyUp(TextView widget, Spannable text, int keyCode, KeyEvent event) { in onKeyUp() 100 if ((event.getMetaState() & KeyEvent.META_SHIFT_ON) != 0) { in onGenericMotionEvent() 137 protected int getMovementMetaState(Spannable buffer, KeyEvent event) { in getMovementMetaState() 141 return KeyEvent.normalizeMetaState(metaState) & ~KeyEvent.META_SHIFT_MASK; in getMovementMetaState() 162 int keyCode, int movementMetaState, KeyEvent event) { in handleMovementKey() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/ |
D | KeyguardKeyEventInteractorTest.kt | 21 import android.view.KeyEvent 57 KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_VOLUME_DOWN) 59 KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_VOLUME_UP) 60 private val backKeyEvent = KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK) 138 verifyActionUpCollapsesTheShade(KeyEvent.KEYCODE_MENU) in dispatchKeyEvent_menuActionUp_awakeShadeLocked_collapsesShade() 147 verifyActionsDoNothing(KeyEvent.KEYCODE_MENU) in dispatchKeyEvent_menuActionUp_asleepKeyguard_neverCollapsesShade() 155 verifyActionUpShowsPrimaryBouncer(KeyEvent.KEYCODE_SPACE) in dispatchKeyEvent_spaceActionUp_awakeKeyguard_collapsesShade() 163 verifyActionUpCollapsesTheShade(KeyEvent.KEYCODE_SPACE) in dispatchKeyEvent_spaceActionUp_shadeLocked_collapsesShade() 171 verifyActionUpShowsPrimaryBouncer(KeyEvent.KEYCODE_ENTER) in dispatchKeyEvent_enterActionUp_awakeKeyguard_showsPrimaryBouncer() 179 verifyActionUpCollapsesTheShade(KeyEvent.KEYCODE_ENTER) in dispatchKeyEvent_enterActionUp_shadeLocked_collapsesShade() [all …]
|