Home
last modified time | relevance | path

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

12345678

/frameworks/base/core/java/com/android/internal/widget/
DNumericTextView.java244 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
245 return isKeyCodeNumeric(keyCode) in onKeyDown()
246 || (keyCode == KeyEvent.KEYCODE_DEL) in onKeyDown()
247 || super.onKeyDown(keyCode, event); in onKeyDown()
251 public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) { in onKeyMultiple() argument
252 return isKeyCodeNumeric(keyCode) in onKeyMultiple()
253 || (keyCode == KeyEvent.KEYCODE_DEL) in onKeyMultiple()
254 || super.onKeyMultiple(keyCode, repeatCount, event); in onKeyMultiple()
258 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
259 return handleKeyUp(keyCode) in onKeyUp()
[all …]
/frameworks/base/core/java/android/view/
DKeyCharacterMap.java291 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
367 public int get(int keyCode, int metaState) { in get() argument
369 char ch = nativeGetCharacter(mPtr, keyCode, metaState); in get()
396 public FallbackAction getFallbackAction(int keyCode, int metaState) { in getFallbackAction() argument
399 if (nativeGetFallbackAction(mPtr, keyCode, metaState, action)) { in getFallbackAction()
428 public char getNumber(int keyCode) { in getNumber() argument
[all …]
DKeyEvent.java1308 boolean onKeyDown(int keyCode, KeyEvent event); in onKeyDown() argument
1324 boolean onKeyLongPress(int keyCode, KeyEvent event); in onKeyLongPress() argument
1335 boolean onKeyUp(int keyCode, KeyEvent event); in onKeyUp() argument
1349 boolean onKeyMultiple(int keyCode, int count, KeyEvent event); in onKeyMultiple() argument
1352 private static native String nativeKeyCodeToString(int keyCode); in nativeKeyCodeToString() argument
1353 private static native int nativeKeyCodeFromString(String keyCode); in nativeKeyCodeFromString() argument
1853 public static final boolean isGamepadButton(int keyCode) { in isGamepadButton() argument
1854 switch (keyCode) { in isGamepadButton()
1896 public static final boolean isConfirmKey(int keyCode) { in isConfirmKey() argument
1897 switch (keyCode) { in isConfirmKey()
[all …]
DInputEventConsistencyVerifier.java211 final int keyCode = event.getKeyCode(); in onKeyEvent() local
214 KeyState state = findKeyState(deviceId, source, keyCode, /*remove*/ false); in onKeyEvent()
228 addKeyState(deviceId, source, keyCode); in onKeyEvent()
233 KeyState state = findKeyState(deviceId, source, keyCode, /*remove*/ true); in onKeyEvent()
600 final int keyCode = keyEvent.getKeyCode(); in onUnhandledEvent() local
601 final KeyState state = findKeyState(deviceId, source, keyCode, /*remove*/ false); in onUnhandledEvent()
744 private KeyState findKeyState(int deviceId, int source, int keyCode, boolean remove) { in findKeyState() argument
749 && state.keyCode == keyCode) { in findKeyState()
766 private void addKeyState(int deviceId, int source, int keyCode) { in addKeyState() argument
767 KeyState state = KeyState.obtain(deviceId, source, keyCode); in addKeyState()
[all …]
/frameworks/native/services/inputflinger/reader/mapper/
DKeyboardInputMapper.cpp82 static int32_t rotateKeyCode(int32_t keyCode, int32_t orientation) { in rotateKeyCode() argument
83 keyCode = rotateStemKey(keyCode, orientation, stemKeyRotationMap, stemKeyRotationMapSize); in rotateKeyCode()
84 return rotateValueUsingRotationMap(keyCode, orientation, keyCodeRotationMap, in rotateKeyCode()
161 static void mapStemKey(int32_t keyCode, const PropertyMap& config, char const* property) { in mapStemKey() argument
165 if (stemKeyRotationMap[i][0] == keyCode) { in mapStemKey()
241 bool KeyboardInputMapper::isMediaKey(int32_t keyCode) { in isMediaKey() argument
242 switch (keyCode) { in isMediaKey()
271 int32_t keyCode; in processKey() local
275 if (getDeviceContext().mapKey(scanCode, usageCode, mMetaState, &keyCode, &keyMetaState, in processKey()
277 keyCode = AKEYCODE_UNKNOWN; in processKey()
[all …]
DKeyboardInputMapper.h37 virtual int32_t getKeyCodeState(uint32_t sourceMask, int32_t keyCode) override;
43 virtual void updateMetaState(int32_t keyCode) override;
51 int32_t keyCode; member
86 bool isMediaKey(int32_t keyCode);
90 bool updateMetaStateIfNeeded(int32_t keyCode, bool down);
/frameworks/base/core/java/android/text/method/
DMetaKeyKeyListener.java326 public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { in onKeyDown() argument
327 if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { in onKeyDown()
332 if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT in onKeyDown()
333 || keyCode == KeyEvent.KEYCODE_NUM) { in onKeyDown()
338 if (keyCode == KeyEvent.KEYCODE_SYM) { in onKeyDown()
383 public boolean onKeyUp(View view, Editable content, int keyCode, KeyEvent event) { in onKeyUp() argument
384 if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { in onKeyUp()
389 if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT in onKeyUp()
390 || keyCode == KeyEvent.KEYCODE_NUM) { in onKeyUp()
395 if (keyCode == KeyEvent.KEYCODE_SYM) { in onKeyUp()
[all …]
/frameworks/base/core/java/android/widget/
DDialerFilter.java110 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
113 switch (keyCode) { in onKeyDown()
125 handled = mDigits.onKeyDown(keyCode, event); in onKeyDown()
126 handled &= mLetters.onKeyDown(keyCode, event); in onKeyDown()
130 handled = mLetters.onKeyDown(keyCode, event); in onKeyDown()
138 mLetters.onKeyDown(keyCode, event); in onKeyDown()
141 handled = mDigits.onKeyDown(keyCode, event); in onKeyDown()
145 handled = mDigits.onKeyDown(keyCode, event); in onKeyDown()
149 handled = mLetters.onKeyDown(keyCode, event); in onKeyDown()
159 handled = mLetters.onKeyDown(keyCode, event); in onKeyDown()
[all …]
/frameworks/native/libs/input/
DKeyCharacterMap.cpp176 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/jni/
Dandroid_view_KeyCharacterMap.cpp43 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/base/packages/SystemUI/src/com/android/keyguard/
DKeyguardPinBasedInputView.java87 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
88 if (KeyEvent.isConfirmKey(keyCode)) { in onKeyDown()
91 } else if (keyCode == KeyEvent.KEYCODE_DEL) { in onKeyDown()
95 if (keyCode >= KeyEvent.KEYCODE_0 && keyCode <= KeyEvent.KEYCODE_9) { in onKeyDown()
96 int number = keyCode - KeyEvent.KEYCODE_0; in onKeyDown()
100 if (keyCode >= KeyEvent.KEYCODE_NUMPAD_0 && keyCode <= KeyEvent.KEYCODE_NUMPAD_9) { in onKeyDown()
101 int number = keyCode - KeyEvent.KEYCODE_NUMPAD_0; in onKeyDown()
105 return super.onKeyDown(keyCode, event); in onKeyDown()
260 public boolean onKey(View v, int keyCode, KeyEvent event) { in onKey() argument
262 return onKeyDown(keyCode, event); in onKey()
/frameworks/native/include/input/
DKeyCharacterMap.h72 int32_t keyCode; member
95 char16_t getDisplayLabel(int32_t keyCode) const;
101 char16_t getNumber(int32_t keyCode) const;
106 char16_t getCharacter(int32_t keyCode, int32_t metaState) const;
112 bool getFallbackAction(int32_t keyCode, int32_t metaState,
119 char16_t getMatch(int32_t keyCode, const char16_t* chars,
238 bool getKey(int32_t keyCode, const Key** outKey) const;
239 bool getKeyBehavior(int32_t keyCode, int32_t metaState,
248 int32_t deviceId, int32_t keyCode, int32_t metaState, bool down, nsecs_t time);
254 int32_t keyCode, int32_t keyMetaState,
[all …]
/frameworks/base/core/java/com/android/internal/app/
DAlertActivity.java106 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
107 if (mAlert.onKeyDown(keyCode, event)) return true; in onKeyDown()
108 return super.onKeyDown(keyCode, event); in onKeyDown()
112 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
113 if (mAlert.onKeyUp(keyCode, event)) return true; in onKeyUp()
114 return super.onKeyUp(keyCode, event); in onKeyUp()
DMediaRouteControllerDialog.java234 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
235 if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN in onKeyDown()
236 || keyCode == KeyEvent.KEYCODE_VOLUME_UP) { in onKeyDown()
237 mRoute.requestUpdateVolume(keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ? -1 : 1); in onKeyDown()
240 return super.onKeyDown(keyCode, event); in onKeyDown()
244 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
245 if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN in onKeyUp()
246 || keyCode == KeyEvent.KEYCODE_VOLUME_UP) { in onKeyUp()
249 return super.onKeyUp(keyCode, event); in onKeyUp()
/frameworks/base/services/core/java/com/android/server/tv/
DUinputBridge.java37 private static native void nativeSendKey(long ptr, int keyCode, boolean down); in nativeSendKey() argument
50 private static native void nativeSendGamepadKey(long ptr, int keyCode, boolean down); in nativeSendGamepadKey() argument
138 public void sendKeyDown(IBinder token, int keyCode) { in sendKeyDown() argument
140 nativeSendKey(mPtr, keyCode, true /*down*/); in sendKeyDown()
144 public void sendKeyUp(IBinder token, int keyCode) { in sendKeyUp() argument
146 nativeSendKey(mPtr, keyCode, false /*down*/); in sendKeyUp()
172 public void sendGamepadKey(IBinder token, int keyCode, boolean down) { in sendGamepadKey() argument
174 nativeSendGamepadKey(mPtr, keyCode, down); in sendGamepadKey()
DTvRemoteServiceInput.java183 public void sendKeyDown(IBinder token, int keyCode) { in sendKeyDown() argument
185 Slog.d(TAG, "sendKeyDown(), token: " + token + ", keyCode: " + keyCode); in sendKeyDown()
197 inputBridge.sendKeyDown(token, keyCode); in sendKeyDown()
205 public void sendKeyUp(IBinder token, int keyCode) { in sendKeyUp() argument
207 Slog.d(TAG, "sendKeyUp(), token: " + token + ", keyCode: " + keyCode); in sendKeyUp()
219 inputBridge.sendKeyUp(token, keyCode); in sendKeyUp()
315 public void sendGamepadKeyDown(IBinder token, int keyCode) { in sendGamepadKeyDown() argument
328 inputBridge.sendGamepadKey(token, keyCode, true); in sendGamepadKeyDown()
/frameworks/base/core/java/android/inputmethodservice/
DSoftInputWindow.java199 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
200 if (mKeyEventCallback != null && mKeyEventCallback.onKeyDown(keyCode, event)) { in onKeyDown()
203 return super.onKeyDown(keyCode, event); in onKeyDown()
206 public boolean onKeyLongPress(int keyCode, KeyEvent event) { in onKeyLongPress() argument
207 if (mKeyEventCallback != null && mKeyEventCallback.onKeyLongPress(keyCode, event)) { in onKeyLongPress()
210 return super.onKeyLongPress(keyCode, event); in onKeyLongPress()
213 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
214 if (mKeyEventCallback != null && mKeyEventCallback.onKeyUp(keyCode, event)) { in onKeyUp()
217 return super.onKeyUp(keyCode, event); in onKeyUp()
220 public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) { in onKeyMultiple() argument
[all …]
/frameworks/base/core/java/com/android/internal/globalactions/
DActionsDialog.java80 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
81 if (mAlert.onKeyDown(keyCode, event)) { in onKeyDown()
84 return super.onKeyDown(keyCode, event); in onKeyDown()
88 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
89 if (mAlert.onKeyUp(keyCode, event)) { in onKeyUp()
92 return super.onKeyUp(keyCode, event); in onKeyUp()
/frameworks/base/services/core/java/com/android/server/policy/
DGlobalKeyManager.java70 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/media/lib/tvremote/java/com/android/media/tv/remoteprovider/
DTvRemoteProvider.java263 public void sendKeyUp(IBinder token, int keyCode) throws RuntimeException { in sendKeyUp() argument
265 if (DEBUG_KEYS) Log.d(TAG, "sendKeyUp() token: " + token + ", keyCode: " + keyCode); in sendKeyUp()
267 mRemoteServiceInput.sendKeyUp(token, keyCode); in sendKeyUp()
280 public void sendKeyDown(IBinder token, int keyCode) throws RuntimeException { in sendKeyDown() argument
283 ", keyCode: " + keyCode); in sendKeyDown()
285 mRemoteServiceInput.sendKeyDown(token, keyCode); in sendKeyDown()
367 public void sendGamepadKeyDown(@NonNull IBinder token, int keyCode) throws RuntimeException { in sendGamepadKeyDown() argument
374 mRemoteServiceInput.sendGamepadKeyDown(token, keyCode); in sendGamepadKeyDown()
390 public void sendGamepadKeyUp(@NonNull IBinder token, int keyCode) throws RuntimeException { in sendGamepadKeyUp() argument
397 mRemoteServiceInput.sendGamepadKeyUp(token, keyCode); in sendGamepadKeyUp()
/frameworks/base/media/java/android/media/tv/
DITvRemoteServiceInput.aidl33 void sendKeyDown(IBinder token, int keyCode); in sendKeyDown() argument
35 void sendKeyUp(IBinder token, int keyCode); in sendKeyUp() argument
45 void sendGamepadKeyDown(IBinder token, int keyCode); in sendGamepadKeyDown() argument
46 void sendGamepadKeyUp(IBinder token, int keyCode); in sendGamepadKeyUp() argument
/frameworks/base/packages/SystemUI/src/com/android/systemui/settings/
DBrightnessDialog.java80 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
81 if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN in onKeyDown()
82 || keyCode == KeyEvent.KEYCODE_VOLUME_UP in onKeyDown()
83 || keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) { in onKeyDown()
87 return super.onKeyDown(keyCode, event); in onKeyDown()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DSafetyWarningDialog.java72 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
73 if (mDisableOnVolumeUp && keyCode == KeyEvent.KEYCODE_VOLUME_UP in onKeyDown()
77 return super.onKeyDown(keyCode, event); in onKeyDown()
81 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
82 if (keyCode == KeyEvent.KEYCODE_VOLUME_UP && mNewVolumeUp in onKeyUp()
88 return super.onKeyUp(keyCode, event); in onKeyUp()
/frameworks/base/core/java/android/hardware/hdmi/
DHdmiClient.java51 public void sendKeyEvent(int keyCode, boolean isPressed) { in sendKeyEvent() argument
53 mService.sendKeyEvent(getDeviceType(), keyCode, isPressed); in sendKeyEvent() local
70 public void sendVolumeKeyEvent(int keyCode, boolean isPressed) { in sendVolumeKeyEvent() argument
72 mService.sendVolumeKeyEvent(getDeviceType(), keyCode, isPressed); in sendVolumeKeyEvent() local
/frameworks/base/core/java/com/android/internal/policy/
DPhoneFallbackEventHandler.java71 final int keyCode = event.getKeyCode(); in dispatchKeyEvent() local
74 return onKeyDown(keyCode, event); in dispatchKeyEvent()
76 return onKeyUp(keyCode, event); in dispatchKeyEvent()
81 boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
88 switch (keyCode) { in onKeyDown()
215 boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
217 Log.d(TAG, "up " + keyCode); in onKeyUp()
224 switch (keyCode) { in onKeyUp()

12345678