Home
last modified time | relevance | path

Searched refs:keyCode (Results 1 – 25 of 152) sorted by relevance

1234567

/packages/inputmethods/LeanbackIME/src/com/android/inputmethod/leanback/
DLeanbackKeyboardController.java83 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/Car/tests/RotaryIME/src/com/android/car/rotaryime/
DRotaryIme.java64 int keyCode = KEYCODE_A + i; in onCreateInputView() local
65 keyTextView.setOnClickListener(view -> handleKeyClick(view, keyCode)); in onCreateInputView()
66 keyTextView.setOnLongClickListener(view -> handleKeyLongClick(view, keyCode)); in onCreateInputView()
98 int keyCode = KeyEvent.KEYCODE_0 + i; in onCreateInputView() local
100 view -> handleKeyClick(view, keyCode)); in onCreateInputView()
120 private void handleKeyClick(View view, int keyCode) { in handleKeyClick() argument
121 handleKeyClick(view, keyCode, /* metaState= */ 0); in handleKeyClick()
129 private void handleKeyClick(View view, int keyCode, int metaState) { in handleKeyClick() argument
131 sendDownUpKeyEvents(keyCode, metaState); in handleKeyClick()
138 private boolean handleKeyLongClick(View view, int keyCode) { in handleKeyLongClick() argument
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/common/
DSeekBarPreference.java95 public boolean onKey(View v, int keyCode, KeyEvent event) {
103 && (keyCode == KeyEvent.KEYCODE_DPAD_LEFT
104 || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT
105 || keyCode == KeyEvent.KEYCODE_DPAD_UP
106 || keyCode == KeyEvent.KEYCODE_DPAD_DOWN)) {
111 if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
117 if (keyCode == KeyEvent.KEYCODE_BACK) {
127 if (KeyEvent.isConfirmKey(keyCode)) {
132 return mSeekBar.onKeyDown(keyCode, event);
134 return mSeekBar.onKeyUp(keyCode, event);
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/
DFocusManager.java115 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/inputmethods/LatinIME/java/src/com/android/inputmethod/event/
DHardwareKeyboardEventDecoder.java48 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()
DEvent.java114 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/apps/TV/src/com/android/tv/ui/
DTvOverlayManager.java637 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 …]
DKeypadChannelSwitchView.java190 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/LeanbackIME/src/com/android/inputmethod/leanback/service/
DLeanbackImeService.java64 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/QuickSearchBox/src/com/android/quicksearchbox/ui/
DSearchActivityView.java367 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/
DMoviePlayer.java414 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 …]
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/input/
DInputTestFragment.java97 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/
DDtmfKeyListener.java75 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/
DKeyboardInterpreter.java37 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/
DSelectInputActivity.java96 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/Launcher3/src/com/android/launcher3/widget/
DNavigableAppWidgetHostView.java87 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
88 if (!mChildrenFocused && keyCode == KeyEvent.KEYCODE_ENTER) { in onKeyDown()
92 return super.onKeyDown(keyCode, event); in onKeyDown()
96 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
98 if (!mChildrenFocused && keyCode == KeyEvent.KEYCODE_ENTER) { in onKeyUp()
121 return super.onKeyUp(keyCode, event); in onKeyUp()
/packages/apps/Car/Cluster/DirectRenderingCluster/src/android/car/cluster/
DClusterRenderingService.java303 private void emulateKeyEvent(int keyCode) { in emulateKeyEvent() argument
304 Log.i(TAG, "emulateKeyEvent, keyCode: " + keyCode); in emulateKeyEvent()
307 KeyEvent event = obtainKeyEvent(keyCode, downTime, eventTime, KeyEvent.ACTION_DOWN); in emulateKeyEvent()
311 event = obtainKeyEvent(keyCode, downTime, eventTime, KeyEvent.ACTION_UP); in emulateKeyEvent()
315 private KeyEvent obtainKeyEvent(int keyCode, long downTime, long eventTime, int action) { in obtainKeyEvent() argument
317 if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { in obtainKeyEvent()
319 } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) { in obtainKeyEvent()
326 keyCode, in obtainKeyEvent()
/packages/apps/Car/tests/RotaryPlayground/src/com/android/car/rotaryplayground/
DDirectManipulationHandler.java127 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
129 Log.d(L.TAG, "View: " + view + " is handling " + KeyEvent.keyCodeToString(keyCode) in onKey()
134 switch (keyCode) { in onKey()
152 return mBackDelegate.onKey(view, keyCode, keyEvent); in onKey()
166 return mNudgeDelegate.onKey(view, keyCode, keyEvent); in onKey()
DDirectManipulationView.java143 public boolean onKey(View v, int keyCode, KeyEvent keyEvent) { in onKey() argument
150 handleNudgeEvent(dmv, keyCode); in onKey()
159 private void handleNudgeEvent(@NonNull DirectManipulationView dmv, int keyCode) { in handleNudgeEvent() argument
160 switch (keyCode) { in handleNudgeEvent()
174 throw new IllegalArgumentException("Invalid keycode: " + keyCode); in handleNudgeEvent()
DRotaryDirectManipulationWidgets.java76 .setBackHandler((v, keyCode, event) -> { in onCreateView()
203 public boolean onKey(View view, int keyCode, KeyEvent event) { in onKey() argument
204 switch (keyCode) { in onKey()
212 int direction = KEYCODE_TO_DIRECTION_MAP.get(keyCode); in onKey()
281 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
285 switch (keyCode) { in onKey()
/packages/apps/TV/tests/func/src/com/android/tv/tests/ui/
DLiveChannelsTestController.java59 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/
DKeyboardBot.java57 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/
DRootsList.java57 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/Car/Dialer/src/com/android/car/dialer/ui/dialpad/
DKeypadFragment.java131 KeypadClickListener(@DialKeyCode int keyCode) { in KeypadClickListener() argument
132 mKeycode = keyCode; in KeypadClickListener()
156 public boolean onKey(View v, int keyCode, KeyEvent event) { in onKey() argument
157 if (mKeypadCallback != null && isConfirmKey(keyCode)) { in onKey()
199 private boolean isConfirmKey(int keyCode) { in isConfirmKey() argument
200 switch (keyCode) { in isConfirmKey()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/dialog/
DPinDialogFragment.java489 mNumberViewHolder.setOnKeyListener((v, keyCode, event) -> {
491 switch (keyCode) {
499 if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
519 switch (keyCode) {
568 int keyCode = event.getKeyCode();
569 if (keyCode >= KeyEvent.KEYCODE_0 && keyCode <= KeyEvent.KEYCODE_9) {
570 jumpNextValue(keyCode - KeyEvent.KEYCODE_0);
571 } else if (keyCode != KeyEvent.KEYCODE_DPAD_CENTER
572 && keyCode != KeyEvent.KEYCODE_ENTER) {

1234567