/packages/apps/Launcher3/src/com/android/launcher3/ |
D | FocusHelper.java | 36 public boolean onKey(View v, int keyCode, KeyEvent event) { in onKey() argument 37 return FocusHelper.handleIconKeyEvent(v, keyCode, event); in onKey() 46 public boolean onKey(View v, int keyCode, KeyEvent event) { in onKey() argument 47 return FocusHelper.handleHotseatButtonKeyEvent(v, keyCode, event); in onKey() 56 public boolean onKey(View v, int keyCode, KeyEvent event) { in onKey() argument 57 if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT in onKey() 58 || keyCode == KeyEvent.KEYCODE_PAGE_DOWN || keyCode == KeyEvent.KEYCODE_PAGE_UP) { in onKey() 62 return FocusHelper.handleIconKeyEvent(v, keyCode, event); in onKey() 88 public boolean onKey(View v, int keyCode, KeyEvent e) { in onKey() argument 89 boolean consume = FocusLogic.shouldConsume(keyCode); in onKey() [all …]
|
/packages/inputmethods/LeanbackIME/src/com/android/inputmethod/leanback/ |
D | LeanbackKeyboardController.java | 83 public void onEntry(int type, int keyCode, CharSequence result); in onEntry() argument 278 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 281 if (isEnterKey(keyCode)) { in onKeyDown() 289 return handleKeyDownEvent(keyCode, event.getRepeatCount()); in onKeyDown() 292 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 294 if (isEnterKey(keyCode)) { in onKeyUp() 304 return handleKeyUpEvent(keyCode, event.getEventTime()); in onKeyUp() 417 private boolean handleKeyDownEvent(int keyCode, int eventRepeatCount) { in handleKeyDownEvent() argument 418 keyCode = getSimplifiedKey(keyCode); in handleKeyDownEvent() 421 if (keyCode == KeyEvent.KEYCODE_BACK) { in handleKeyDownEvent() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | FocusManager.java | 115 public boolean handleKey(DocumentHolder doc, int keyCode, KeyEvent event) { in handleKey() argument 117 if (mSearchHelper.handleKey(doc, keyCode, event)) { in handleKey() 121 if (Events.isNavigationKeyCode(keyCode)) { in handleKey() 123 int endPos = findTargetPosition(doc.itemView, keyCode, event); in handleKey() 252 private int findTargetPosition(View view, int keyCode, KeyEvent event) { in findTargetPosition() argument 253 switch (keyCode) { in findTargetPosition() 260 return findPagedTargetPosition(view, keyCode, event); in findTargetPosition() 265 switch (keyCode) { in findTargetPosition() 277 switch (keyCode) { in findTargetPosition() 331 private int findPagedTargetPosition(View view, int keyCode, KeyEvent event) { in findPagedTargetPosition() argument [all …]
|
/packages/apps/TV/src/com/android/tv/ui/ |
D | TvOverlayManager.java | 637 public void showKeypadChannelSwitch(int keyCode) { in showKeypadChannelSwitch() argument 645 mKeypadChannelSwitchView.onNumberKeyUp(keyCode - KeyEvent.KEYCODE_0); in showKeypadChannelSwitch() 975 public int onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 981 if (isMediaStartKey(keyCode)) { in onKeyDown() 993 return mKeypadChannelSwitchView.onKeyDown(keyCode, event) in onKeyDown() 998 return mSelectInputView.onKeyDown(keyCode, event) in onKeyDown() 1007 public int onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 1009 if (isMediaStartKey(keyCode)) { in onKeyUp() 1030 switch (keyCode) { in onKeyUp() 1068 if (keyCode == KeyEvent.KEYCODE_I || keyCode == KeyEvent.KEYCODE_TV_INPUT) { in onKeyUp() [all …]
|
D | KeypadChannelSwitchView.java | 190 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 192 if (isChannelNumberKey(keyCode)) { in onKeyUp() 193 onNumberKeyUp(keyCode - KeyEvent.KEYCODE_0); in onKeyUp() 196 if (ChannelNumber.isChannelNumberDelimiterKey(keyCode)) { in onKeyUp() 200 return super.onKeyUp(keyCode, event); in onKeyUp() 244 public static boolean isChannelNumberKey(int keyCode) { in isChannelNumberKey() argument 245 return keyCode >= KeyEvent.KEYCODE_0 && keyCode <= KeyEvent.KEYCODE_9; in isChannelNumberKey()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/event/ |
D | HardwareKeyboardEventDecoder.java | 48 final int keyCode = keyEvent.getKeyCode(); in decodeHardwareKey() local 50 if (KeyEvent.KEYCODE_DEL == keyCode) { in decodeHardwareKey() 54 if (keyEvent.isPrintingKey() || KeyEvent.KEYCODE_SPACE == keyCode in decodeHardwareKey() 55 || KeyEvent.KEYCODE_ENTER == keyCode) { in decodeHardwareKey() 59 codePointAndFlags & KeyCharacterMap.COMBINING_ACCENT_MASK, keyCode, in decodeHardwareKey() 62 if (KeyEvent.KEYCODE_ENTER == keyCode) { in decodeHardwareKey() 71 return Event.createHardwareKeypressEvent(Constants.CODE_ENTER, keyCode, in decodeHardwareKey() 76 return Event.createHardwareKeypressEvent(codePointAndFlags, keyCode, null /* next */, in decodeHardwareKey()
|
D | Event.java | 114 private Event(final int type, final CharSequence text, final int codePoint, final int keyCode, in Event() argument 120 mKeyCode = keyCode; in Event() 142 public static Event createSoftwareKeypressEvent(final int codePoint, final int keyCode, in createSoftwareKeypressEvent() argument 144 return new Event(EVENT_TYPE_INPUT_KEYPRESS, null /* text */, codePoint, keyCode, x, y, in createSoftwareKeypressEvent() 149 public static Event createHardwareKeypressEvent(final int codePoint, final int keyCode, in createHardwareKeypressEvent() argument 151 return new Event(EVENT_TYPE_INPUT_KEYPRESS, null /* text */, codePoint, keyCode, in createHardwareKeypressEvent() 159 public static Event createDeadEvent(final int codePoint, final int keyCode, final Event next) { in createDeadEvent() argument 161 return new Event(EVENT_TYPE_INPUT_KEYPRESS, null /* text */, codePoint, keyCode, in createDeadEvent() 218 public static Event createSoftwareTextEvent(final CharSequence text, final int keyCode) { in createSoftwareTextEvent() argument 219 return new Event(EVENT_TYPE_SOFTWARE_GENERATED_STRING, text, NOT_A_CODE_POINT, keyCode, in createSoftwareTextEvent()
|
/packages/inputmethods/LeanbackIME/src/com/android/inputmethod/leanback/service/ |
D | LeanbackImeService.java | 64 public void onEntry(int type, int keyCode, CharSequence result) { 65 handleTextEntry(type, keyCode, result); 191 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 193 && mKeyboardController.onKeyUp(keyCode, event)) { in onKeyUp() 196 return super.onKeyUp(keyCode, event); in onKeyUp() 200 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 202 && mKeyboardController.onKeyDown(keyCode, event)) { in onKeyDown() 205 return super.onKeyDown(keyCode, event); in onKeyDown() 262 private void handleTextEntry(int type, int keyCode, CharSequence c) { in handleTextEntry() argument 298 if (LeanbackUtils.isAlphabet(keyCode)) { in handleTextEntry() [all …]
|
/packages/apps/TvSettings/QuickSettings/src/com/android/tv/quicksettings/ |
D | SettingsDialog.java | 193 public boolean onKeyUp(int keyCode, @NonNull KeyEvent event) { in onKeyUp() argument 195 return super.onKeyUp(keyCode, event); in onKeyUp() 199 return integerSettingHandleKeyCode(keyCode, event); in onKeyUp() 201 return stringSettingHandleKeyCode(keyCode, event); in onKeyUp() 203 return super.onKeyUp(keyCode, event); in onKeyUp() 207 private boolean integerSettingHandleKeyCode(int keyCode, KeyEvent event) { in integerSettingHandleKeyCode() argument 208 switch (keyCode) { in integerSettingHandleKeyCode() 220 return super.onKeyUp(keyCode, event); in integerSettingHandleKeyCode() 234 private boolean stringSettingHandleKeyCode(int keyCode, KeyEvent event) { in stringSettingHandleKeyCode() argument 236 return super.onKeyUp(keyCode, event); in stringSettingHandleKeyCode() [all …]
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/ |
D | SearchActivityView.java | 367 long suggestionId, int keyCode, KeyEvent event) { in onSuggestionKeyDown() argument 369 if ( keyCode == KeyEvent.KEYCODE_ENTER in onSuggestionKeyDown() 370 || keyCode == KeyEvent.KEYCODE_SEARCH in onSuggestionKeyDown() 371 || keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { in onSuggestionKeyDown() 422 public boolean onKey(View v, int keyCode, KeyEvent event) { in onKey() argument 427 listView.getSelectedItemId(), keyCode, event)) { in onKey() 431 return forwardKeyToQueryTextView(keyCode, event); in onKey() 484 public boolean onKey(View v, int keyCode, KeyEvent event) { in onKey() argument 485 return forwardKeyToQueryTextView(keyCode, event); in onKey() 489 private boolean forwardKeyToQueryTextView(int keyCode, KeyEvent event) { in forwardKeyToQueryTextView() argument [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
D | MoviePlayer.java | 414 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 418 return isMediaKey(keyCode); in onKeyDown() 421 switch (keyCode) { in onKeyDown() 449 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 450 return isMediaKey(keyCode); in onKeyUp() 453 private static boolean isMediaKey(int keyCode) { in isMediaKey() argument 454 return keyCode == KeyEvent.KEYCODE_HEADSETHOOK in isMediaKey() 455 || keyCode == KeyEvent.KEYCODE_MEDIA_PREVIOUS in isMediaKey() 456 || keyCode == KeyEvent.KEYCODE_MEDIA_NEXT in isMediaKey() 457 || keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in isMediaKey() [all …]
|
D | MovieActivity.java | 264 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 265 return mPlayer.onKeyDown(keyCode, event) in onKeyDown() 266 || super.onKeyDown(keyCode, event); in onKeyDown() 270 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 271 return mPlayer.onKeyUp(keyCode, event) in onKeyUp() 272 || super.onKeyUp(keyCode, event); in onKeyUp()
|
/packages/apps/Launcher3/src/com/android/launcher3/widget/ |
D | NavigableAppWidgetHostView.java | 59 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 60 if (!mChildrenFocused && keyCode == KeyEvent.KEYCODE_ENTER) { in onKeyDown() 64 return super.onKeyDown(keyCode, event); in onKeyDown() 68 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 70 if (!mChildrenFocused && keyCode == KeyEvent.KEYCODE_ENTER) { in onKeyUp() 93 return super.onKeyUp(keyCode, event); in onKeyUp()
|
/packages/apps/Launcher3/src/com/android/launcher3/util/ |
D | FocusLogic.java | 77 public static boolean shouldConsume(int keyCode) { in shouldConsume() argument 78 return (keyCode == KeyEvent.KEYCODE_DPAD_LEFT || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT || in shouldConsume() 79 keyCode == KeyEvent.KEYCODE_DPAD_UP || keyCode == KeyEvent.KEYCODE_DPAD_DOWN || in shouldConsume() 80 keyCode == KeyEvent.KEYCODE_MOVE_HOME || keyCode == KeyEvent.KEYCODE_MOVE_END || in shouldConsume() 81 keyCode == KeyEvent.KEYCODE_PAGE_UP || keyCode == KeyEvent.KEYCODE_PAGE_DOWN); in shouldConsume() 84 public static int handleKeyEvent(int keyCode, int [][] map, int iconIdx, int pageIndex, in handleKeyEvent() argument 97 switch (keyCode) { in handleKeyEvent()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/input/ |
D | InputTestFragment.java | 97 public synchronized void count(int keyCode, boolean keyDown) { in count() argument 98 Integer count = mKeyCodeToCountMap.get(keyCode); in count() 104 mKeyCodeToCountMap.remove(keyCode); in count() 106 mKeyCodeToCountMap.put(keyCode, count); in count() 298 private Button createButton(@StringRes int textResId, int keyCode) { in createButton() argument 299 return createButton(textResId, keyCode, VehicleDisplay.MAIN); in createButton() 302 private Button createButton(@StringRes int textResId, int keyCode, int targetDisplay) { in createButton() argument 306 button.setOnClickListener(v -> onButtonClick(keyCode, targetDisplay)); in createButton() 310 private void onButtonClick(int keyCode, int targetDisplay) { in onButtonClick() argument 314 sKeyPressCommand, HW_KEY_INPUT, keyCode, targetDisplay)); in onButtonClick()
|
/packages/apps/Dialer/java/com/android/incallui/ |
D | DtmfKeyListener.java | 75 public boolean backspace(View view, Editable content, int keyCode, KeyEvent event) { in backspace() argument 86 public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { in onKeyDown() argument 88 if (!super.onKeyDown(view, content, keyCode, event)) { in onKeyDown() 127 public boolean onKeyUp(View view, Editable content, int keyCode, KeyEvent event) { in onKeyUp() argument 129 super.onKeyUp(view, content, keyCode, event); in onKeyUp()
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
D | KeyboardInterpreter.java | 37 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 41 switch (keyCode) { in onKeyDown() 66 if (DEBUG) Log.d(TAG, "dropped unexpected: " + keyCode); in onKeyDown() 73 switch (keyCode) { in onKeyDown() 112 if (DEBUG) Log.d(TAG, "dropped unexpected: " + keyCode); in onKeyDown()
|
/packages/apps/TV/src/com/android/tv/ |
D | SelectInputActivity.java | 96 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 97 if (keyCode == KeyEvent.KEYCODE_I || keyCode == KeyEvent.KEYCODE_TV_INPUT) { in onKeyUp() 98 mSelectInputView.onKeyUp(keyCode, event); in onKeyUp() 101 return super.onKeyUp(keyCode, event); in onKeyUp()
|
/packages/apps/Car/Cluster/src/android/car/cluster/ |
D | ClusterRenderingService.java | 301 private void emulateKeyEvent(int keyCode) { in emulateKeyEvent() argument 302 Log.i(TAG, "emulateKeyEvent, keyCode: " + keyCode); in emulateKeyEvent() 305 KeyEvent event = obtainKeyEvent(keyCode, downTime, eventTime, KeyEvent.ACTION_DOWN); in emulateKeyEvent() 309 event = obtainKeyEvent(keyCode, downTime, eventTime, KeyEvent.ACTION_UP); in emulateKeyEvent() 313 private KeyEvent obtainKeyEvent(int keyCode, long downTime, long eventTime, int action) { in obtainKeyEvent() argument 315 if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { in obtainKeyEvent() 317 } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) { in obtainKeyEvent() 324 keyCode, in obtainKeyEvent()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/ |
D | CarEmulator.java | 79 public void injectKey(int keyCode, int action) { in injectKey() argument 83 .addIntValue(action, keyCode, 0, 0) in injectKey() 89 public void injectKey(int keyCode) { in injectKey() argument 90 injectKey(keyCode, VehicleHwKeyInputAction.ACTION_DOWN); in injectKey() 91 injectKey(keyCode, VehicleHwKeyInputAction.ACTION_UP); in injectKey()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/dialog/ |
D | PinDialogFragment.java | 430 mNumberViewHolder.setOnKeyListener((v, keyCode, event) -> { 432 switch (keyCode) { 440 if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { 460 switch (keyCode) { 509 int keyCode = event.getKeyCode(); 510 if (keyCode >= KeyEvent.KEYCODE_0 && keyCode <= KeyEvent.KEYCODE_9) { 511 jumpNextValue(keyCode - KeyEvent.KEYCODE_0); 512 } else if (keyCode != KeyEvent.KEYCODE_DPAD_CENTER 513 && keyCode != KeyEvent.KEYCODE_ENTER) {
|
/packages/apps/TV/tests/func/src/com/android/tv/tests/ui/ |
D | LiveChannelsTestController.java | 59 private void assertPressKeyUp(int keyCode, boolean sync) { in assertPressKeyUp() argument 60 assertPressKey(KeyEvent.ACTION_UP, keyCode, sync); in assertPressKeyUp() 63 private void assertPressKey(int action, int keyCode, boolean sync) { in assertPressKey() argument 70 keyCode, in assertPressKey() 216 public void pressKeyCode(int keyCode) { in pressKeyCode() argument 217 mDevice.pressKeyCode(keyCode); in pressKeyCode()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/bots/ |
D | KeyboardBot.java | 57 public void pressKey(int keyCode) { in pressKey() argument 58 mDevice.pressKeyCode(keyCode); in pressKey() 61 public void pressKey(int keyCode, int metaState) { in pressKey() argument 62 mDevice.pressKeyCode(keyCode, metaState); in pressKey()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/sidebar/ |
D | RootsList.java | 57 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 58 switch (keyCode) { in onKeyDown() 63 && super.onKeyDown(keyCode, event); in onKeyDown() 69 return super.onKeyDown(keyCode, event); in onKeyDown()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/files/ |
D | FilesActivity.java | 360 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 361 return mActivityInputHandler.onKeyDown(keyCode, event) in onKeyDown() 363 keyCode, in onKeyDown() 365 || super.onKeyDown(keyCode, event); in onKeyDown() 369 public boolean onKeyShortcut(int keyCode, KeyEvent event) { in onKeyShortcut() argument 373 switch (keyCode) { in onKeyShortcut() 390 return super.onKeyShortcut(keyCode, event); in onKeyShortcut()
|