Home
last modified time | relevance | path

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

1234567

/frameworks/base/core/java/android/view/
DKeyCharacterMap.java289 private static native char nativeGetCharacter(int ptr, int keyCode, int metaState); in nativeGetCharacter() argument
290 private static native boolean nativeGetFallbackAction(int ptr, int keyCode, int metaState, in nativeGetFallbackAction() argument
292 private static native char nativeGetNumber(int ptr, int keyCode); in nativeGetNumber() argument
293 private static native char nativeGetMatch(int ptr, int keyCode, char[] chars, int metaState); in nativeGetMatch() argument
294 private static native char nativeGetDisplayLabel(int ptr, int keyCode); in nativeGetDisplayLabel() argument
364 public int get(int keyCode, int metaState) { in get() argument
366 char ch = nativeGetCharacter(mPtr, keyCode, metaState); in get()
393 public FallbackAction getFallbackAction(int keyCode, int metaState) { in getFallbackAction() argument
396 if (nativeGetFallbackAction(mPtr, keyCode, metaState, action)) { in getFallbackAction()
425 public char getNumber(int keyCode) { in getNumber() argument
[all …]
DInputEventConsistencyVerifier.java204 final int keyCode = event.getKeyCode(); in onKeyEvent() local
207 KeyState state = findKeyState(deviceId, source, keyCode, /*remove*/ false); in onKeyEvent()
221 addKeyState(deviceId, source, keyCode); in onKeyEvent()
226 KeyState state = findKeyState(deviceId, source, keyCode, /*remove*/ true); in onKeyEvent()
533 final int keyCode = keyEvent.getKeyCode(); in onUnhandledEvent() local
534 final KeyState state = findKeyState(deviceId, source, keyCode, /*remove*/ false); in onUnhandledEvent()
668 private KeyState findKeyState(int deviceId, int source, int keyCode, boolean remove) { in findKeyState() argument
673 && state.keyCode == keyCode) { in findKeyState()
690 private void addKeyState(int deviceId, int source, int keyCode) { in addKeyState() argument
691 KeyState state = KeyState.obtain(deviceId, source, keyCode); in addKeyState()
[all …]
/frameworks/base/core/java/android/text/method/
DMetaKeyKeyListener.java266 public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { in onKeyDown() argument
267 if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { in onKeyDown()
272 if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT in onKeyDown()
273 || keyCode == KeyEvent.KEYCODE_NUM) { in onKeyDown()
278 if (keyCode == KeyEvent.KEYCODE_SYM) { in onKeyDown()
321 public boolean onKeyUp(View view, Editable content, int keyCode, KeyEvent event) { in onKeyUp() argument
322 if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { in onKeyUp()
327 if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT in onKeyUp()
328 || keyCode == KeyEvent.KEYCODE_NUM) { in onKeyUp()
333 if (keyCode == KeyEvent.KEYCODE_SYM) { in onKeyUp()
[all …]
DBaseKeyListener.java48 public boolean backspace(View view, Editable content, int keyCode, KeyEvent event) { in backspace() argument
49 return backspaceOrForwardDelete(view, content, keyCode, event, false); in backspace()
60 public boolean forwardDelete(View view, Editable content, int keyCode, KeyEvent event) { in forwardDelete() argument
61 return backspaceOrForwardDelete(view, content, keyCode, event, true); in forwardDelete()
64 private boolean backspaceOrForwardDelete(View view, Editable content, int keyCode, in backspaceOrForwardDelete() argument
151 int keyCode, KeyEvent event) { in onKeyDown() argument
153 switch (keyCode) { in onKeyDown()
155 handled = backspace(view, content, keyCode, event); in onKeyDown()
158 handled = forwardDelete(view, content, keyCode, event); in onKeyDown()
169 return super.onKeyDown(view, content, keyCode, event); in onKeyDown()
DTextKeyListener.java133 int keyCode, KeyEvent event) { in onKeyDown() argument
136 return im.onKeyDown(view, content, keyCode, event); in onKeyDown()
141 int keyCode, KeyEvent event) { in onKeyUp() argument
144 return im.onKeyUp(view, content, keyCode, event); in onKeyUp()
218 int keyCode, KeyEvent event) { in onKeyDown() argument
222 public boolean onKeyUp(View view, Editable content, int keyCode, in onKeyUp() argument
/frameworks/base/core/java/android/widget/
DDialerFilter.java107 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
110 switch (keyCode) { in onKeyDown()
122 handled = mDigits.onKeyDown(keyCode, event); in onKeyDown()
123 handled &= mLetters.onKeyDown(keyCode, event); in onKeyDown()
127 handled = mLetters.onKeyDown(keyCode, event); in onKeyDown()
135 mLetters.onKeyDown(keyCode, event); in onKeyDown()
138 handled = mDigits.onKeyDown(keyCode, event); in onKeyDown()
142 handled = mDigits.onKeyDown(keyCode, event); in onKeyDown()
146 handled = mLetters.onKeyDown(keyCode, event); in onKeyDown()
156 handled = mLetters.onKeyDown(keyCode, event); in onKeyDown()
[all …]
DVideoView.java534 public boolean onKeyDown(int keyCode, KeyEvent event) in onKeyDown() argument
536 boolean isKeyCodeSupported = keyCode != KeyEvent.KEYCODE_BACK && in onKeyDown()
537 keyCode != KeyEvent.KEYCODE_VOLUME_UP && in onKeyDown()
538 keyCode != KeyEvent.KEYCODE_VOLUME_DOWN && in onKeyDown()
539 keyCode != KeyEvent.KEYCODE_VOLUME_MUTE && in onKeyDown()
540 keyCode != KeyEvent.KEYCODE_MENU && in onKeyDown()
541 keyCode != KeyEvent.KEYCODE_CALL && in onKeyDown()
542 keyCode != KeyEvent.KEYCODE_ENDCALL; in onKeyDown()
544 if (keyCode == KeyEvent.KEYCODE_HEADSETHOOK || in onKeyDown()
545 keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE) { in onKeyDown()
[all …]
DAutoCompleteTextView.java645 public boolean onKeyPreIme(int keyCode, KeyEvent event) { in onKeyPreIme() argument
646 if (keyCode == KeyEvent.KEYCODE_BACK && isPopupShowing() in onKeyPreIme()
667 return super.onKeyPreIme(keyCode, event); in onKeyPreIme()
671 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
672 boolean consumed = mPopup.onKeyUp(keyCode, event); in onKeyUp()
674 switch (keyCode) { in onKeyUp()
688 if (isPopupShowing() && keyCode == KeyEvent.KEYCODE_TAB && event.hasNoModifiers()) { in onKeyUp()
693 return super.onKeyUp(keyCode, event); in onKeyUp()
697 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
698 if (mPopup.onKeyDown(keyCode, event)) { in onKeyDown()
[all …]
DListPopupWindow.java814 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
822 if (keyCode != KeyEvent.KEYCODE_SPACE in onKeyDown()
824 || (keyCode != KeyEvent.KEYCODE_ENTER in onKeyDown()
825 && keyCode != KeyEvent.KEYCODE_DPAD_CENTER))) { in onKeyDown()
845 if ((below && keyCode == KeyEvent.KEYCODE_DPAD_UP && curIndex <= firstItem) || in onKeyDown()
846 (!below && keyCode == KeyEvent.KEYCODE_DPAD_DOWN && curIndex >= lastItem)) { in onKeyDown()
859 consumed = mDropDownList.onKeyDown(keyCode, event); in onKeyDown()
860 if (DEBUG) Log.v(TAG, "Key down: code=" + keyCode + " list consumed=" + consumed); in onKeyDown()
873 switch (keyCode) { in onKeyDown()
883 if (below && keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { in onKeyDown()
[all …]
DMediaController.java449 int keyCode = event.getKeyCode(); in dispatchKeyEvent() local
452 if (keyCode == KeyEvent.KEYCODE_HEADSETHOOK in dispatchKeyEvent()
453 || keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchKeyEvent()
454 || keyCode == KeyEvent.KEYCODE_SPACE) { in dispatchKeyEvent()
463 } else if (keyCode == KeyEvent.KEYCODE_MEDIA_PLAY) { in dispatchKeyEvent()
470 } else if (keyCode == KeyEvent.KEYCODE_MEDIA_STOP in dispatchKeyEvent()
471 || keyCode == KeyEvent.KEYCODE_MEDIA_PAUSE) { in dispatchKeyEvent()
478 } else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN in dispatchKeyEvent()
479 || keyCode == KeyEvent.KEYCODE_VOLUME_UP in dispatchKeyEvent()
480 || keyCode == KeyEvent.KEYCODE_VOLUME_MUTE in dispatchKeyEvent()
[all …]
DSearchView.java879 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
886 SearchableInfo.ActionKeyInfo actionKey = mSearchable.findActionKey(keyCode); in onKeyDown()
888 launchQuerySearch(keyCode, actionKey.getQueryActionMsg(), mQueryTextView.getText() in onKeyDown()
893 return super.onKeyDown(keyCode, event); in onKeyDown()
902 public boolean onKey(View v, int keyCode, KeyEvent event) {
909 Log.d(LOG_TAG, "mTextListener.onKey(" + keyCode + "," + event + "), selection: "
917 return onSuggestionsKey(v, keyCode, event);
924 if (keyCode == KeyEvent.KEYCODE_ENTER) {
934 SearchableInfo.ActionKeyInfo actionKey = mSearchable.findActionKey(keyCode);
936 launchQuerySearch(keyCode, actionKey.getQueryActionMsg(), mQueryTextView
[all …]
/frameworks/base/libs/androidfw/
DKeyCharacterMap.cpp174 int32_t keyCode = overlay->mKeys.keyAt(i); in combine() local
176 ssize_t oldIndex = map->mKeys.indexOfKey(keyCode); in combine()
181 map->mKeys.add(keyCode, new Key(*key)); in combine()
205 char16_t KeyCharacterMap::getDisplayLabel(int32_t keyCode) const { in getDisplayLabel()
208 if (getKey(keyCode, &key)) { in getDisplayLabel()
212 ALOGD("getDisplayLabel: keyCode=%d ~ Result %d.", keyCode, result); in getDisplayLabel()
217 char16_t KeyCharacterMap::getNumber(int32_t keyCode) const { in getNumber()
220 if (getKey(keyCode, &key)) { in getNumber()
224 ALOGD("getNumber: keyCode=%d ~ Result %d.", keyCode, result); in getNumber()
229 char16_t KeyCharacterMap::getCharacter(int32_t keyCode, int32_t metaState) const { in getCharacter() argument
[all …]
DKeyLayoutMap.cpp95 *outKeyCode = key->keyCode; in mapKey()
121 status_t KeyLayoutMap::findScanCodesForKey(int32_t keyCode, Vector<int32_t>* outScanCodes) const { in findScanCodesForKey() argument
124 if (mKeysByScanCode.valueAt(i).keyCode == keyCode) { in findScanCodesForKey()
227 int32_t keyCode = getKeyCodeByLabel(keyCodeToken.string()); in parseKey() local
228 if (!keyCode) { in parseKey()
256 mapUsage ? "usage" : "scan code", code, keyCode, flags); in parseKey()
259 key.keyCode = keyCode; in parseKey()
/frameworks/base/core/java/com/android/internal/app/
DAlertActivity.java78 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
79 if (mAlert.onKeyDown(keyCode, event)) return true; in onKeyDown()
80 return super.onKeyDown(keyCode, event); in onKeyDown()
84 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
85 if (mAlert.onKeyUp(keyCode, event)) return true; in onKeyUp()
86 return super.onKeyUp(keyCode, event); in onKeyUp()
/frameworks/base/core/jni/
Dandroid_view_KeyCharacterMap.cpp41 jfieldID keyCode; member
116 jint keyCode, jint metaState) { in nativeGetCharacter() argument
118 return map->getMap()->getCharacter(keyCode, metaState); in nativeGetCharacter()
121 static jboolean nativeGetFallbackAction(JNIEnv *env, jobject clazz, jint ptr, jint keyCode, in nativeGetFallbackAction() argument
126 bool result = map->getMap()->getFallbackAction(keyCode, metaState, &fallbackAction); in nativeGetFallbackAction()
128 env->SetIntField(fallbackActionObj, gFallbackActionClassInfo.keyCode, in nativeGetFallbackAction()
129 fallbackAction.keyCode); in nativeGetFallbackAction()
136 static jchar nativeGetNumber(JNIEnv *env, jobject clazz, jint ptr, jint keyCode) { in nativeGetNumber() argument
138 return map->getMap()->getNumber(keyCode); in nativeGetNumber()
141 static jchar nativeGetMatch(JNIEnv *env, jobject clazz, jint ptr, jint keyCode, in nativeGetMatch() argument
[all …]
Dandroid_view_KeyEvent.cpp80 jint keyCode = env->GetIntField(eventObj, gKeyEventClassInfo.mKeyCode); in android_view_KeyEvent_toNative() local
87 event->initialize(deviceId, source, action, flags, keyCode, scanCode, metaState, repeatCount, in android_view_KeyEvent_toNative()
104 static jboolean native_isSystemKey(JNIEnv* env, jobject clazz, jint keyCode) { in native_isSystemKey() argument
105 return KeyEvent::isSystemKey(keyCode); in native_isSystemKey()
108 static jboolean native_hasDefaultAction(JNIEnv* env, jobject clazz, jint keyCode) { in native_hasDefaultAction() argument
109 return KeyEvent::hasDefaultAction(keyCode); in native_hasDefaultAction()
/frameworks/base/include/androidfw/
DKeyCharacterMap.h67 int32_t keyCode; member
90 char16_t getDisplayLabel(int32_t keyCode) const;
96 char16_t getNumber(int32_t keyCode) const;
101 char16_t getCharacter(int32_t keyCode, int32_t metaState) const;
107 bool getFallbackAction(int32_t keyCode, int32_t metaState,
114 char16_t getMatch(int32_t keyCode, const char16_t* chars,
225 bool getKey(int32_t keyCode, const Key** outKey) const;
226 bool getKeyBehavior(int32_t keyCode, int32_t metaState,
235 int32_t deviceId, int32_t keyCode, int32_t metaState, bool down, nsecs_t time);
241 int32_t keyCode, int32_t keyMetaState,
[all …]
/frameworks/base/core/java/android/webkit/
DPluginFullScreenHolder.java100 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
102 return super.onKeyDown(keyCode, event); in onKeyDown()
104 mWebView.onKeyDown(keyCode, event); in onKeyDown()
110 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
112 return super.onKeyUp(keyCode, event); in onKeyUp()
114 mWebView.onKeyUp(keyCode, event); in onKeyUp()
/frameworks/av/media/libmediaplayerservice/
DMidiMetadataRetriever.cpp61 const char* MidiMetadataRetriever::extractMetadata(int keyCode) in extractMetadata() argument
63 ALOGV("extractMetdata: key(%d)", keyCode); in extractMetadata()
69 switch (keyCode) { in extractMetadata()
85 ALOGE("Unsupported key code (%d)", keyCode); in extractMetadata()
/frameworks/base/policy/src/com/android/internal/policy/impl/
DPhoneFallbackEventHandler.java65 final int keyCode = event.getKeyCode(); in dispatchKeyEvent() local
68 return onKeyDown(keyCode, event); in dispatchKeyEvent()
70 return onKeyUp(keyCode, event); in dispatchKeyEvent()
74 boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
81 switch (keyCode) { in onKeyDown()
185 boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
187 Slog.d(TAG, "up " + keyCode); in onKeyUp()
194 switch (keyCode) { in onKeyUp()
/frameworks/base/cmds/input/src/com/android/commands/input/
DInput.java60 int keyCode = KeyEvent.keyCodeFromString(args[1]); in run() local
61 if (keyCode == KeyEvent.KEYCODE_UNKNOWN) { in run()
62 keyCode = KeyEvent.keyCodeFromString("KEYCODE_" + args[1]); in run()
64 sendKeyEvent(keyCode); in run()
161 private void sendKeyEvent(int keyCode) { in sendKeyEvent() argument
163 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 0, 0, in sendKeyEvent()
165 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_UP, keyCode, 0, 0, in sendKeyEvent()
/frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/
DKeyguardViewBase.java125 abstract public void wakeWhenReadyTq(int keyCode); in wakeWhenReadyTq() argument
163 final int keyCode = event.getKeyCode(); in interceptMediaKey() local
165 switch (keyCode) { in interceptMediaKey()
205 keyCode == KeyEvent.KEYCODE_VOLUME_UP in interceptMediaKey()
216 switch (keyCode) { in interceptMediaKey()
/frameworks/base/policy/src/com/android/internal/policy/impl/keyguard_obsolete/
DKeyguardViewBase.java127 abstract public void wakeWhenReadyTq(int keyCode); in wakeWhenReadyTq() argument
178 final int keyCode = event.getKeyCode(); in interceptMediaKey() local
180 switch (keyCode) { in interceptMediaKey()
220 keyCode == KeyEvent.KEYCODE_VOLUME_UP in interceptMediaKey()
231 switch (keyCode) { in interceptMediaKey()
/frameworks/base/core/java/com/android/internal/view/menu/
DActionMenu.java161 private ActionMenuItem findItemWithShortcut(int keyCode, KeyEvent event) { in findItemWithShortcut() argument
171 if (keyCode == shortcut) { in findItemWithShortcut()
178 public boolean isShortcutKey(int keyCode, KeyEvent event) { in isShortcutKey() argument
179 return findItemWithShortcut(keyCode, event) != null; in isShortcutKey()
191 public boolean performShortcut(int keyCode, KeyEvent event, int flags) { in performShortcut() argument
192 ActionMenuItem item = findItemWithShortcut(keyCode, event); in performShortcut()
/frameworks/base/core/tests/coretests/src/android/widget/gridview/
DGridDelete.java55 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
56 if (keyCode == KeyEvent.KEYCODE_DEL) { in onKeyDown()
61 return super.onKeyDown(keyCode, event); in onKeyDown()

1234567