/frameworks/base/core/java/com/android/internal/widget/ |
D | NumericTextView.java | 242 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 243 return isKeyCodeNumeric(keyCode) in onKeyDown() 244 || (keyCode == KeyEvent.KEYCODE_DEL) in onKeyDown() 245 || super.onKeyDown(keyCode, event); in onKeyDown() 249 public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) { in onKeyMultiple() argument 250 return isKeyCodeNumeric(keyCode) in onKeyMultiple() 251 || (keyCode == KeyEvent.KEYCODE_DEL) in onKeyMultiple() 252 || super.onKeyMultiple(keyCode, repeatCount, event); in onKeyMultiple() 256 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 257 return handleKeyUp(keyCode) in onKeyUp() [all …]
|
/frameworks/base/core/java/android/view/ |
D | KeyCharacterMap.java | 291 private static native char nativeGetCharacter(long ptr, int keyCode, int metaState); in nativeGetCharacter() argument 292 private static native boolean nativeGetFallbackAction(long ptr, int keyCode, int metaState, in nativeGetFallbackAction() argument 294 private static native char nativeGetNumber(long ptr, int keyCode); in nativeGetNumber() argument 295 private static native char nativeGetMatch(long ptr, int keyCode, char[] chars, int metaState); in nativeGetMatch() argument 296 private static native char nativeGetDisplayLabel(long ptr, int keyCode); in nativeGetDisplayLabel() argument 366 public int get(int keyCode, int metaState) { in get() argument 368 char ch = nativeGetCharacter(mPtr, keyCode, metaState); in get() 395 public FallbackAction getFallbackAction(int keyCode, int metaState) { in getFallbackAction() argument 398 if (nativeGetFallbackAction(mPtr, keyCode, metaState, action)) { in getFallbackAction() 427 public char getNumber(int keyCode) { in getNumber() argument [all …]
|
D | KeyEvent.java | 1254 boolean onKeyDown(int keyCode, KeyEvent event); in onKeyDown() argument 1270 boolean onKeyLongPress(int keyCode, KeyEvent event); in onKeyLongPress() argument 1281 boolean onKeyUp(int keyCode, KeyEvent event); in onKeyUp() argument 1294 boolean onKeyMultiple(int keyCode, int count, KeyEvent event); in onKeyMultiple() argument 1297 private static native String nativeKeyCodeToString(int keyCode); in nativeKeyCodeToString() argument 1298 private static native int nativeKeyCodeFromString(String keyCode); in nativeKeyCodeFromString() argument 1736 public static final boolean isGamepadButton(int keyCode) { in isGamepadButton() argument 1737 switch (keyCode) { in isGamepadButton() 1778 public static final boolean isConfirmKey(int keyCode) { in isConfirmKey() argument 1779 switch (keyCode) { in isConfirmKey() [all …]
|
D | InputEventConsistencyVerifier.java | 208 final int keyCode = event.getKeyCode(); in onKeyEvent() local 211 KeyState state = findKeyState(deviceId, source, keyCode, /*remove*/ false); in onKeyEvent() 225 addKeyState(deviceId, source, keyCode); in onKeyEvent() 230 KeyState state = findKeyState(deviceId, source, keyCode, /*remove*/ true); in onKeyEvent() 595 final int keyCode = keyEvent.getKeyCode(); in onUnhandledEvent() local 596 final KeyState state = findKeyState(deviceId, source, keyCode, /*remove*/ false); in onUnhandledEvent() 739 private KeyState findKeyState(int deviceId, int source, int keyCode, boolean remove) { in findKeyState() argument 744 && state.keyCode == keyCode) { in findKeyState() 761 private void addKeyState(int deviceId, int source, int keyCode) { in addKeyState() argument 762 KeyState state = KeyState.obtain(deviceId, source, keyCode); in addKeyState() [all …]
|
/frameworks/support/v4/java/android/support/v4/media/ |
D | TransportPerformer.java | 126 public boolean onMediaButtonDown(int keyCode, KeyEvent event) { in onMediaButtonDown() argument 127 switch (keyCode) { in onMediaButtonDown() 163 public boolean onMediaButtonUp(int keyCode, KeyEvent event) { in onMediaButtonUp() argument 188 int keyCode = 0; in onAudioFocusChange() local 193 keyCode = TransportMediator.KEYCODE_MEDIA_PAUSE; in onAudioFocusChange() 196 if (keyCode != 0) { in onAudioFocusChange() 198 onMediaButtonDown(keyCode, new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 0)); in onAudioFocusChange() 199 onMediaButtonUp(keyCode, new KeyEvent(now, now, KeyEvent.ACTION_UP, keyCode, 0)); in onAudioFocusChange()
|
D | TransportMediator.java | 111 static boolean isMediaKey(int keyCode) { in isMediaKey() argument 112 switch (keyCode) { in isMediaKey() 132 public boolean onKeyDown(int keyCode, KeyEvent event) { 133 return isMediaKey(keyCode) ? mCallbacks.onMediaButtonDown(keyCode, event) : false; 136 public boolean onKeyLongPress(int keyCode, KeyEvent event) { 141 public boolean onKeyUp(int keyCode, KeyEvent event) { 142 return isMediaKey(keyCode) ? mCallbacks.onMediaButtonUp(keyCode, event) : false; 146 public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) {
|
/frameworks/base/core/java/android/text/method/ |
D | MetaKeyKeyListener.java | 325 public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { in onKeyDown() argument 326 if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { in onKeyDown() 331 if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT in onKeyDown() 332 || keyCode == KeyEvent.KEYCODE_NUM) { in onKeyDown() 337 if (keyCode == KeyEvent.KEYCODE_SYM) { in onKeyDown() 380 public boolean onKeyUp(View view, Editable content, int keyCode, KeyEvent event) { in onKeyUp() argument 381 if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { in onKeyUp() 386 if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT in onKeyUp() 387 || keyCode == KeyEvent.KEYCODE_NUM) { in onKeyUp() 392 if (keyCode == KeyEvent.KEYCODE_SYM) { in onKeyUp() [all …]
|
/frameworks/base/core/java/android/widget/ |
D | DialerFilter.java | 105 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 108 switch (keyCode) { in onKeyDown() 120 handled = mDigits.onKeyDown(keyCode, event); in onKeyDown() 121 handled &= mLetters.onKeyDown(keyCode, event); in onKeyDown() 125 handled = mLetters.onKeyDown(keyCode, event); in onKeyDown() 133 mLetters.onKeyDown(keyCode, event); in onKeyDown() 136 handled = mDigits.onKeyDown(keyCode, event); in onKeyDown() 140 handled = mDigits.onKeyDown(keyCode, event); in onKeyDown() 144 handled = mLetters.onKeyDown(keyCode, event); in onKeyDown() 154 handled = mLetters.onKeyDown(keyCode, event); in onKeyDown() [all …]
|
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/ |
D | FocusManager.java | 82 public boolean handleKey(DocumentHolder doc, int keyCode, KeyEvent event) { in handleKey() argument 84 if (mSearchHelper.handleKey(doc, keyCode, event)) { in handleKey() 89 if (keyCode == KeyEvent.KEYCODE_SPACE) { in handleKey() 91 keyCode = KeyEvent.KEYCODE_PAGE_UP; in handleKey() 93 keyCode = KeyEvent.KEYCODE_PAGE_DOWN; in handleKey() 97 if (Events.isNavigationKeyCode(keyCode)) { in handleKey() 99 int endPos = findTargetPosition(doc.itemView, keyCode, event); in handleKey() 152 private int findTargetPosition(View view, int keyCode, KeyEvent event) { in findTargetPosition() argument 153 switch (keyCode) { in findTargetPosition() 160 return findPagedTargetPosition(view, keyCode, event); in findTargetPosition() [all …]
|
/frameworks/native/libs/input/ |
D | KeyCharacterMap.cpp | 176 int32_t keyCode = overlay->mKeys.keyAt(i); in combine() local 178 ssize_t oldIndex = map->mKeys.indexOfKey(keyCode); in combine() 183 map->mKeys.add(keyCode, new Key(*key)); in combine() 207 char16_t KeyCharacterMap::getDisplayLabel(int32_t keyCode) const { in getDisplayLabel() 210 if (getKey(keyCode, &key)) { in getDisplayLabel() 214 ALOGD("getDisplayLabel: keyCode=%d ~ Result %d.", keyCode, result); in getDisplayLabel() 219 char16_t KeyCharacterMap::getNumber(int32_t keyCode) const { in getNumber() 222 if (getKey(keyCode, &key)) { in getNumber() 226 ALOGD("getNumber: keyCode=%d ~ Result %d.", keyCode, result); in getNumber() 231 char16_t KeyCharacterMap::getCharacter(int32_t keyCode, int32_t metaState) const { in getCharacter() argument [all …]
|
/frameworks/base/core/java/android/inputmethodservice/ |
D | SoftInputWindow.java | 132 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 133 if (mKeyEventCallback != null && mKeyEventCallback.onKeyDown(keyCode, event)) { in onKeyDown() 136 return super.onKeyDown(keyCode, event); in onKeyDown() 139 public boolean onKeyLongPress(int keyCode, KeyEvent event) { in onKeyLongPress() argument 140 if (mKeyEventCallback != null && mKeyEventCallback.onKeyLongPress(keyCode, event)) { in onKeyLongPress() 143 return super.onKeyLongPress(keyCode, event); in onKeyLongPress() 146 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 147 if (mKeyEventCallback != null && mKeyEventCallback.onKeyUp(keyCode, event)) { in onKeyUp() 150 return super.onKeyUp(keyCode, event); in onKeyUp() 153 public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) { in onKeyMultiple() argument [all …]
|
/frameworks/base/packages/Keyguard/src/com/android/keyguard/ |
D | KeyguardPinBasedInputView.java | 83 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 84 if (KeyEvent.isConfirmKey(keyCode)) { in onKeyDown() 87 } else if (keyCode == KeyEvent.KEYCODE_DEL) { in onKeyDown() 91 if (keyCode >= KeyEvent.KEYCODE_0 && keyCode <= KeyEvent.KEYCODE_9) { in onKeyDown() 92 int number = keyCode - KeyEvent.KEYCODE_0; in onKeyDown() 96 if (keyCode >= KeyEvent.KEYCODE_NUMPAD_0 && keyCode <= KeyEvent.KEYCODE_NUMPAD_9) { in onKeyDown() 97 int number = keyCode - KeyEvent.KEYCODE_NUMPAD_0; in onKeyDown() 101 return super.onKeyDown(keyCode, event); in onKeyDown() 240 public boolean onKey(View v, int keyCode, KeyEvent event) { in onKey() argument 242 return onKeyDown(keyCode, event); in onKey()
|
/frameworks/base/core/jni/ |
D | android_view_KeyCharacterMap.cpp | 43 jfieldID keyCode; member 118 jint keyCode, jint metaState) { in nativeGetCharacter() argument 120 return map->getMap()->getCharacter(keyCode, metaState); in nativeGetCharacter() 123 static jboolean nativeGetFallbackAction(JNIEnv *env, jobject clazz, jlong ptr, jint keyCode, in nativeGetFallbackAction() argument 128 bool result = map->getMap()->getFallbackAction(keyCode, metaState, &fallbackAction); in nativeGetFallbackAction() 130 env->SetIntField(fallbackActionObj, gFallbackActionClassInfo.keyCode, in nativeGetFallbackAction() 131 fallbackAction.keyCode); in nativeGetFallbackAction() 138 static jchar nativeGetNumber(JNIEnv *env, jobject clazz, jlong ptr, jint keyCode) { in nativeGetNumber() argument 140 return map->getMap()->getNumber(keyCode); in nativeGetNumber() 143 static jchar nativeGetMatch(JNIEnv *env, jobject clazz, jlong ptr, jint keyCode, in nativeGetMatch() argument [all …]
|
/frameworks/native/include/input/ |
D | KeyCharacterMap.h | 70 int32_t keyCode; member 93 char16_t getDisplayLabel(int32_t keyCode) const; 99 char16_t getNumber(int32_t keyCode) const; 104 char16_t getCharacter(int32_t keyCode, int32_t metaState) const; 110 bool getFallbackAction(int32_t keyCode, int32_t metaState, 117 char16_t getMatch(int32_t keyCode, const char16_t* chars, 236 bool getKey(int32_t keyCode, const Key** outKey) const; 237 bool getKeyBehavior(int32_t keyCode, int32_t metaState, 246 int32_t deviceId, int32_t keyCode, int32_t metaState, bool down, nsecs_t time); 252 int32_t keyCode, int32_t keyMetaState, [all …]
|
/frameworks/base/core/java/com/android/internal/app/ |
D | AlertActivity.java | 94 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 95 if (mAlert.onKeyDown(keyCode, event)) return true; in onKeyDown() 96 return super.onKeyDown(keyCode, event); in onKeyDown() 100 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 101 if (mAlert.onKeyUp(keyCode, event)) return true; in onKeyUp() 102 return super.onKeyUp(keyCode, event); in onKeyUp()
|
D | MediaRouteControllerDialog.java | 221 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 222 if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN in onKeyDown() 223 || keyCode == KeyEvent.KEYCODE_VOLUME_UP) { in onKeyDown() 224 mRoute.requestUpdateVolume(keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ? -1 : 1); in onKeyDown() 227 return super.onKeyDown(keyCode, event); in onKeyDown() 231 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 232 if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN in onKeyUp() 233 || keyCode == KeyEvent.KEYCODE_VOLUME_UP) { in onKeyUp() 236 return super.onKeyUp(keyCode, event); in onKeyUp()
|
/frameworks/opt/datetimepicker/src/com/android/datetimepicker/time/ |
D | TimePickerDialog.java | 489 private boolean processKeyUp(int keyCode) { 490 if (keyCode == KeyEvent.KEYCODE_ESCAPE || keyCode == KeyEvent.KEYCODE_BACK) { 493 } else if (keyCode == KeyEvent.KEYCODE_TAB) { 500 } else if (keyCode == KeyEvent.KEYCODE_ENTER) { 513 } else if (keyCode == KeyEvent.KEYCODE_DEL) { 530 } else if (keyCode == KeyEvent.KEYCODE_0 || keyCode == KeyEvent.KEYCODE_1 531 || keyCode == KeyEvent.KEYCODE_2 || keyCode == KeyEvent.KEYCODE_3 532 || keyCode == KeyEvent.KEYCODE_4 || keyCode == KeyEvent.KEYCODE_5 533 || keyCode == KeyEvent.KEYCODE_6 || keyCode == KeyEvent.KEYCODE_7 534 || keyCode == KeyEvent.KEYCODE_8 || keyCode == KeyEvent.KEYCODE_9 [all …]
|
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ |
D | Action.java | 141 public final void addKeyCode(int keyCode) { in addKeyCode() argument 142 mKeyCodes.add(keyCode); in addKeyCode() 148 public final void removeKeyCode(int keyCode) { in removeKeyCode() argument 149 mKeyCodes.remove(keyCode); in removeKeyCode() 155 public final boolean respondsToKeyCode(int keyCode) { in respondsToKeyCode() argument 156 return mKeyCodes.contains(keyCode); in respondsToKeyCode()
|
/frameworks/base/services/core/java/com/android/server/policy/ |
D | GlobalKeyManager.java | 70 boolean handleGlobalKey(Context context, int keyCode, KeyEvent event) { in handleGlobalKey() argument 72 ComponentName component = mKeyMapping.get(keyCode); in handleGlobalKey() 88 boolean shouldHandleGlobalKey(int keyCode, KeyEvent event) { in shouldHandleGlobalKey() argument 89 return mKeyMapping.get(keyCode) != null; in shouldHandleGlobalKey() 108 int keyCode = KeyEvent.keyCodeFromString(keyCodeName); in loadGlobalKeys() local 109 if (keyCode != KeyEvent.KEYCODE_UNKNOWN) { in loadGlobalKeys() 110 mKeyMapping.put(keyCode, ComponentName.unflattenFromString( in loadGlobalKeys()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/ |
D | SafetyWarningDialog.java | 65 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 66 if (keyCode == KeyEvent.KEYCODE_VOLUME_UP && event.getRepeatCount() == 0) { in onKeyDown() 69 return super.onKeyDown(keyCode, event); in onKeyDown() 73 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 74 if (keyCode == KeyEvent.KEYCODE_VOLUME_UP && mNewVolumeUp in onKeyUp() 80 return super.onKeyUp(keyCode, event); in onKeyUp()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/settings/ |
D | BrightnessDialog.java | 68 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 69 if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN in onKeyDown() 70 || keyCode == KeyEvent.KEYCODE_VOLUME_UP in onKeyDown() 71 || keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) { in onKeyDown() 75 return super.onKeyDown(keyCode, event); in onKeyDown()
|
/frameworks/base/services/core/java/com/android/server/tv/ |
D | TvRemoteService.java | 157 private void sendKeyDownInternalLocked(IBinder token, int keyCode) { in sendKeyDownInternalLocked() argument 159 Slog.d(TAG, "sendKeyDownInternalLocked(), token: " + token + ", keyCode: " + keyCode); in sendKeyDownInternalLocked() 164 inputBridge.sendKeyDown(token, keyCode); in sendKeyDownInternalLocked() 168 private void sendKeyUpInternalLocked(IBinder token, int keyCode) { in sendKeyUpInternalLocked() argument 170 Slog.d(TAG, "sendKeyUpInternalLocked(), token: " + token + ", keyCode: " + keyCode); in sendKeyUpInternalLocked() 175 inputBridge.sendKeyUp(token, keyCode); in sendKeyUpInternalLocked() 310 public void sendKeyDown(TvRemoteProviderProxy provider, IBinder token, int keyCode) { in sendKeyDown() argument 312 Slog.d(TAG, "sendKeyDown(), token: " + token + ", keyCode: " + keyCode); in sendKeyDown() 316 mService.sendKeyDownInternalLocked(token, keyCode); in sendKeyDown() 322 public void sendKeyUp(TvRemoteProviderProxy provider, IBinder token, int keyCode) { in sendKeyUp() argument [all …]
|
D | UinputBridge.java | 39 private static native void nativeSendKey(long ptr, int keyCode, boolean down); in nativeSendKey() argument 102 public void sendKeyDown(IBinder token, int keyCode) { in sendKeyDown() argument 104 nativeSendKey(mPtr, keyCode, true /*down*/); in sendKeyDown() 108 public void sendKeyUp(IBinder token, int keyCode) { in sendKeyUp() argument 110 nativeSendKey(mPtr, keyCode, false /*down*/); in sendKeyUp()
|
/frameworks/base/media/lib/tvremote/java/com/android/media/tv/remoteprovider/ |
D | TvRemoteProvider.java | 191 public void sendKeyUp(IBinder token, int keyCode) throws RuntimeException { in sendKeyUp() argument 192 if (DEBUG_KEYS) Log.d(TAG, "sendKeyUp() token: " + token + ", keyCode: " + keyCode); in sendKeyUp() 194 mRemoteServiceInput.sendKeyUp(token, keyCode); in sendKeyUp() 207 public void sendKeyDown(IBinder token, int keyCode) throws RuntimeException { in sendKeyDown() argument 209 ", keyCode: " + keyCode); in sendKeyDown() 211 mRemoteServiceInput.sendKeyDown(token, keyCode); in sendKeyDown()
|
/frameworks/support/v7/appcompat/tests/src/android/support/v7/testutils/ |
D | BaseTestActivity.java | 95 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 97 return super.onKeyDown(keyCode, event); in onKeyDown() 101 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 103 return super.onKeyUp(keyCode, event); in onKeyUp() 107 public boolean onKeyShortcut(int keyCode, KeyEvent event) { in onKeyShortcut() argument 109 return super.onKeyShortcut(keyCode, event); in onKeyShortcut()
|