Home
last modified time | relevance | path

Searched refs:keyEvent (Results 1 – 25 of 48) sorted by relevance

12

/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DEmojiAltPhysicalKeyDetector.java58 public void onKeyDown(@Nonnull final KeyEvent keyEvent) { in onKeyDown() argument
60 Log.d(TAG, "EmojiHotKeys.onKeyDown() - " + mName + " - considering " + keyEvent); in onKeyDown()
64 Pair.create(keyEvent.getKeyCode(), keyEvent.getMetaState()); in onKeyDown()
70 mMetaState = keyEvent.getMetaState(); in onKeyDown()
79 public void onKeyUp(@Nonnull final KeyEvent keyEvent) { in onKeyUp() argument
81 Log.d(TAG, "EmojiHotKeys.onKeyUp() - " + mName + " - considering " + keyEvent); in onKeyUp()
84 final int keyCode = keyEvent.getKeyCode(); in onKeyUp()
85 int metaState = keyEvent.getMetaState(); in onKeyUp()
96 if (!keyEvent.isCanceled()) { in onKeyUp()
149 public void onKeyDown(@Nonnull final KeyEvent keyEvent) { in onKeyDown() argument
[all …]
DRichInputConnection.java510 public void sendKeyEvent(final KeyEvent keyEvent) { in sendKeyEvent() argument
512 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in sendKeyEvent()
520 switch (keyEvent.getKeyCode()) { in sendKeyEvent()
543 if (null != keyEvent.getCharacters()) { in sendKeyEvent()
544 mCommittedTextBeforeComposingText.append(keyEvent.getCharacters()); in sendKeyEvent()
545 mExpectedSelStart += keyEvent.getCharacters().length(); in sendKeyEvent()
550 final String text = StringUtils.newSingleCodePointString(keyEvent.getUnicodeChar()); in sendKeyEvent()
558 mIC.sendKeyEvent(keyEvent); in sendKeyEvent()
DLatinIME.java1787 public boolean onKeyDown(final int keyCode, final KeyEvent keyEvent) { in onKeyDown() argument
1792 mEmojiAltPhysicalKeyDetector.onKeyDown(keyEvent); in onKeyDown()
1794 return super.onKeyDown(keyCode, keyEvent); in onKeyDown()
1797 keyEvent.getDeviceId()).decodeHardwareKey(keyEvent); in onKeyDown()
1808 return super.onKeyDown(keyCode, keyEvent); in onKeyDown()
1812 public boolean onKeyUp(final int keyCode, final KeyEvent keyEvent) { in onKeyUp() argument
1817 mEmojiAltPhysicalKeyDetector.onKeyUp(keyEvent); in onKeyUp()
1819 return super.onKeyUp(keyCode, keyEvent); in onKeyUp()
1821 final long keyIdentifier = keyEvent.getDeviceId() << 32 + keyEvent.getKeyCode(); in onKeyUp()
1825 return super.onKeyUp(keyCode, keyEvent); in onKeyUp()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/event/
DHardwareKeyboardEventDecoder.java40 public Event decodeHardwareKey(final KeyEvent keyEvent) { in decodeHardwareKey() argument
44 final int codePointAndFlags = keyEvent.getUnicodeChar(); in decodeHardwareKey()
48 final int keyCode = keyEvent.getKeyCode(); in decodeHardwareKey()
49 final boolean isKeyRepeat = (0 != keyEvent.getRepeatCount()); in decodeHardwareKey()
54 if (keyEvent.isPrintingKey() || KeyEvent.KEYCODE_SPACE == keyCode in decodeHardwareKey()
67 if (keyEvent.isShiftPressed()) { in decodeHardwareKey()
DHardwareEventDecoder.java25 public Event decodeHardwareKey(final KeyEvent keyEvent); in decodeHardwareKey() argument
/packages/services/Car/tests/carservice_unit_test/src/android/car/builtin/view/
DKeyEventHelperTest.java30 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_A); in testAssignDisplayId() local
32 KeyEventHelper.setDisplayId(keyEvent, Display.INVALID_DISPLAY); in testAssignDisplayId()
33 assertThat(keyEvent.getDisplayId()).isEqualTo(Display.INVALID_DISPLAY); in testAssignDisplayId()
35 KeyEventHelper.setDisplayId(keyEvent, Display.DEFAULT_DISPLAY); in testAssignDisplayId()
36 assertThat(keyEvent.getDisplayId()).isEqualTo(Display.DEFAULT_DISPLAY); in testAssignDisplayId()
DInputEventHelperTest.java32 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_A); in testAssignDisplayId_toKeyEvent() local
34 InputEventHelper.setDisplayId(keyEvent, Display.INVALID_DISPLAY); in testAssignDisplayId_toKeyEvent()
35 assertThat(keyEvent.getDisplayId()).isEqualTo(Display.INVALID_DISPLAY); in testAssignDisplayId_toKeyEvent()
37 InputEventHelper.setDisplayId(keyEvent, Display.DEFAULT_DISPLAY); in testAssignDisplayId_toKeyEvent()
38 assertThat(keyEvent.getDisplayId()).isEqualTo(Display.DEFAULT_DISPLAY); in testAssignDisplayId_toKeyEvent()
/packages/apps/TV/src/com/android/tv/interactive/
DIAppManager.java99 KeyEvent keyEvent = (KeyEvent) inputEvent; in IAppManager()
100 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN in IAppManager()
101 && keyEvent.isLongPress()) { in IAppManager()
102 if (mMainActivity.onKeyLongPress(keyEvent.getKeyCode(), keyEvent)) { in IAppManager()
106 if (keyEvent.getAction() == KeyEvent.ACTION_UP) { in IAppManager()
107 return mMainActivity.onKeyUp(keyEvent.getKeyCode(), keyEvent); in IAppManager()
108 } else if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in IAppManager()
109 return mMainActivity.onKeyDown(keyEvent.getKeyCode(), keyEvent); in IAppManager()
/packages/apps/Car/Settings/src/com/android/car/settings/common/rotary/
DDirectManipulationHandler.java142 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
143 boolean isActionUp = keyEvent.getAction() == KeyEvent.ACTION_UP; in onKey()
145 + " and action " + KeyEvent.actionToString(keyEvent.getAction()) in onKey()
191 return mNudgeDelegate.onKey(view, keyCode, keyEvent); in onKey()
/packages/services/Car/car-builtin-lib/src/android/car/builtin/view/
DKeyEventHelper.java39 public static void setDisplayId(@NonNull KeyEvent keyEvent, int newDisplayId) { in setDisplayId() argument
40 keyEvent.setDisplayId(newDisplayId); in setDisplayId()
/packages/apps/Car/Cluster/ClusterHomeSample/src/com/android/car/cluster/home/
DClusterHomeApplication.java424 keyEvents.forEach((keyEvent) -> onKeyEvent(keyEvent));
428 private void onKeyEvent(KeyEvent keyEvent) { in onKeyEvent() argument
429 if (DBG) Log.d(TAG, "onKeyEvent: " + keyEvent); in onKeyEvent()
430 if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_MENU) { in onKeyEvent()
431 if (keyEvent.getAction() != KeyEvent.ACTION_DOWN) return; in onKeyEvent()
442 mInputManager.injectInputEvent(keyEvent, INJECT_INPUT_EVENT_MODE_ASYNC); in onKeyEvent()
/packages/services/Car/tests/carservice_test/src/com/android/car/input/
DCarInputManagerTest.java290 KeyEvent keyEvent = newKeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER); in testInjectKeyEvent_mainDisplay() local
292 mCarInputManager.injectKeyEvent(keyEvent, CarOccupantZoneManager.DISPLAY_TYPE_MAIN); in testInjectKeyEvent_mainDisplay()
297 Collections.singletonList(keyEvent))); in testInjectKeyEvent_mainDisplay()
308 KeyEvent keyEvent = newKeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER); in testInjectKeyEvent_instrumentClusterDisplay() local
310 mCarInputManager.injectKeyEvent(keyEvent, in testInjectKeyEvent_instrumentClusterDisplay()
316 Collections.singletonList(keyEvent))); in testInjectKeyEvent_instrumentClusterDisplay()
839 KeyEvent keyEvent = newKeyEvent(KeyEvent.ACTION_DOWN, keyCode); in sendAndAssertKeyEvent() local
841 mCarInputManager.injectKeyEvent(keyEvent, displayType); in sendAndAssertKeyEvent()
846 Collections.singletonList(keyEvent))); in sendAndAssertKeyEvent()
916 KeyEvent keyEvent = lastEvent.second.get(0); in waitAndAssertLastKeyEvent() local
[all …]
/packages/modules/Media/apex/framework/java/android/media/
DMediaCommunicationManager.java261 public void dispatchMediaKeyEvent(@NonNull KeyEvent keyEvent, boolean asSystemService) { in dispatchMediaKeyEvent() argument
262 Objects.requireNonNull(keyEvent, "keyEvent shouldn't be null"); in dispatchMediaKeyEvent()
267 getMediaSessionManager().dispatchMediaKeyEvent(keyEvent, false); in dispatchMediaKeyEvent()
273 keyEvent, asSystemService); in dispatchMediaKeyEvent() local
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/inputverification/
DClickVerifier.java267 KeyEvent keyEvent = (KeyEvent) event; in isInputEventUnderUsageLimit() local
270 .setKeyCode(keyEvent.getKeyCode()) in isInputEventUnderUsageLimit()
271 .setDownTime(keyEvent.getDownTime()) in isInputEventUnderUsageLimit()
272 .setAction(keyEvent.getAction()) in isInputEventUnderUsageLimit()
/packages/services/Car/car-lib/src/android/car/input/
DCarInputHandlingService.java127 protected abstract void onKeyEvent(KeyEvent keyEvent, int targetDisplay); in onKeyEvent() argument
143 public void onKeyEvent(KeyEvent keyEvent, int targetDisplay) throws RemoteException { in onKeyEvent() argument
144 mEventHandler.doKeyEvent(keyEvent, targetDisplay); in onKeyEvent()
DICarInputListener.aidl27 void onKeyEvent(in KeyEvent keyEvent, int targetDisplay) = 1; in onKeyEvent() argument
/packages/apps/DeskClock/src/com/android/deskclock/alarms/
DAlarmActivity.kt259 override fun dispatchKeyEvent(keyEvent: KeyEvent): Boolean { in dispatchKeyEvent()
261 LOGGER.v("dispatchKeyEvent: %s", keyEvent) in dispatchKeyEvent()
263 val keyCode: Int = keyEvent.getKeyCode() in dispatchKeyEvent()
273 if (keyEvent.getAction() == KeyEvent.ACTION_UP) { in dispatchKeyEvent()
279 if (keyEvent.getAction() == KeyEvent.ACTION_UP) { in dispatchKeyEvent()
290 return super.dispatchKeyEvent(keyEvent) in dispatchKeyEvent()
/packages/apps/Car/Cluster/DirectRenderingCluster/src/android/car/cluster/
DClusterRenderingService.java98 void onKeyEvent(KeyEvent keyEvent); in onKeyEvent() argument
319 public void onKeyEvent(KeyEvent keyEvent) { in onKeyEvent() argument
321 Log.d(TAG, "onKeyEvent, keyEvent: " + keyEvent); in onKeyEvent()
323 broadcastClientEvent(client -> client.onKeyEvent(keyEvent)); in onKeyEvent()
/packages/apps/ImsServiceEntitlement/src/com/android/imsserviceentitlement/
DWfcWebPortalFragment.java131 public boolean onKeyDown(int keyCode, KeyEvent keyEvent) { in onKeyDown() argument
132 if (keyCode == KeyEvent.KEYCODE_BACK && keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in onKeyDown()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcp/
DAvrcpNativeInterface.java125 void sendMediaKeyEvent(int keyEvent, boolean pushed) { in sendMediaKeyEvent() argument
126 d("sendMediaKeyEvent: keyEvent=" + keyEvent + " pushed=" + pushed); in sendMediaKeyEvent()
132 mAvrcpService.sendMediaKeyEvent(keyEvent, pushed); in sendMediaKeyEvent()
/packages/services/BuiltInPrintService/src/com/android/bips/ui/
DAddManualPrinterDialog.java186 public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) { in onEditorAction() argument
195 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
/packages/services/Car/car-lib/src/android/car/
DCarProjectionManager.java329 private void translateKeyEventToLegacyListener(@KeyEventNum int keyEvent) { in translateKeyEventToLegacyListener() argument
339 if (keyEvent == KEY_EVENT_VOICE_SEARCH_SHORT_PRESS_KEY_UP) { in translateKeyEventToLegacyListener()
341 } else if (keyEvent == KEY_EVENT_VOICE_SEARCH_LONG_PRESS_KEY_DOWN) { in translateKeyEventToLegacyListener()
344 Slog.e(TAG, "Unexpected key event " + keyEvent); in translateKeyEventToLegacyListener()
/packages/apps/Nfc/src/com/android/nfc/handover/
DBluetoothPeripheralHandover.java573 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PLAY); in startTheMusic() local
574 mAudioManager.dispatchMediaKeyEvent(keyEvent); in startTheMusic()
575 keyEvent = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_PLAY); in startTheMusic()
576 mAudioManager.dispatchMediaKeyEvent(keyEvent); in startTheMusic()
/packages/services/Car/car-lib/src/android/car/cluster/renderer/
DIInstrumentCluster.aidl44 oneway void onKeyEvent(in KeyEvent keyEvent); in onKeyEvent() argument
/packages/apps/Launcher3/src/com/android/launcher3/allapps/
DSearchUiManager.java43 default void preDispatchKeyEvent(KeyEvent keyEvent) { }; in preDispatchKeyEvent() argument

12