Home
last modified time | relevance | path

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

/development/samples/JetBoy/src/com/example/android/jetboy/
DJetBoy.java135 public boolean onKeyDown(int keyCode, KeyEvent msg) { in onKeyDown() argument
136 if (keyCode == KeyEvent.KEYCODE_BACK) { in onKeyDown()
137 return super.onKeyDown(keyCode, msg); in onKeyDown()
139 return mJetBoyThread.doKeyDown(keyCode, msg); in onKeyDown()
147 public boolean onKeyUp(int keyCode, KeyEvent msg) { in onKeyUp() argument
148 if (keyCode == KeyEvent.KEYCODE_BACK) { in onKeyUp()
149 return super.onKeyUp(keyCode, msg); in onKeyUp()
151 return mJetBoyThread.doKeyUp(keyCode, msg); in onKeyUp()
DJetBoyView.java87 public KeyGameEvent(int keyCode, boolean up, KeyEvent msg) { in KeyGameEvent() argument
88 this.keyCode = keyCode; in KeyGameEvent()
93 public int keyCode; field in JetBoyView.KeyGameEvent
755 if (event.keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { in processKeyEvent()
764 if (event.keyCode == KeyEvent.KEYCODE_DPAD_CENTER && (context == null)) { in processKeyEvent()
1118 public boolean doKeyDown(int keyCode, KeyEvent msg) { in doKeyDown() argument
1119 mEventQueue.add(new KeyGameEvent(keyCode, false, msg)); in doKeyDown()
1128 public boolean doKeyUp(int keyCode, KeyEvent msg) { in doKeyUp() argument
1129 mEventQueue.add(new KeyGameEvent(keyCode, true, msg)); in doKeyUp()
/development/samples/LunarLander/src/com/example/android/lunarlander/
DLunarView.java547 boolean doKeyDown(int keyCode, KeyEvent msg) { in doKeyDown() argument
550 if (keyCode == KeyEvent.KEYCODE_DPAD_UP) okStart = true; in doKeyDown()
551 if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) okStart = true; in doKeyDown()
552 if (keyCode == KeyEvent.KEYCODE_S) okStart = true; in doKeyDown()
565 if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER in doKeyDown()
566 || keyCode == KeyEvent.KEYCODE_SPACE) { in doKeyDown()
570 } else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT in doKeyDown()
571 || keyCode == KeyEvent.KEYCODE_Q) { in doKeyDown()
575 } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT in doKeyDown()
576 || keyCode == KeyEvent.KEYCODE_W) { in doKeyDown()
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/accessibility/
DMagnificationService.java84 final int keyCode = event.getKeyCode(); in onKeyEvent() local
85 if (keyCode != KeyEvent.KEYCODE_VOLUME_UP in onKeyEvent()
86 && keyCode != KeyEvent.KEYCODE_VOLUME_DOWN) { in onKeyEvent()
96 handleVolumeKey(keyCode == KeyEvent.KEYCODE_VOLUME_UP); in onKeyEvent()
/development/samples/MultiClientInputMethod/src/com/example/android/multiclientinputmethod/
DClientCallbackImpl.java223 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
225 Log.v(TAG, "onKeyDown clientId=" + mClientId + " keyCode=" + keyCode in onKeyDown()
228 if (keyCode == KeyEvent.KEYCODE_BACK) { in onKeyDown()
240 public boolean onKeyLongPress(int keyCode, KeyEvent event) { in onKeyLongPress() argument
245 public boolean onKeyMultiple(int keyCode, KeyEvent event) { in onKeyMultiple() argument
250 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
252 Log.v(TAG, "onKeyUp clientId=" + mClientId + "keyCode=" + keyCode in onKeyUp()
255 if (keyCode == KeyEvent.KEYCODE_BACK && event.isTracking() && !event.isCanceled()) { in onKeyUp()
/development/samples/SoftKeyboard/src/com/example/android/softkeyboard/
DSoftKeyboard.java321 private boolean translateKeyDown(int keyCode, KeyEvent event) { in translateKeyDown() argument
323 keyCode, event); in translateKeyDown()
358 @Override public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
359 switch (keyCode) { in onKeyDown()
391 if (keyCode == KeyEvent.KEYCODE_SPACE in onKeyDown()
411 if (mPredictionOn && translateKeyDown(keyCode, event)) { in onKeyDown()
417 return super.onKeyDown(keyCode, event); in onKeyDown()
425 @Override public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
432 keyCode, event); in onKeyUp()
436 return super.onKeyUp(keyCode, event); in onKeyUp()
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/view/
DGameControllerInput.java260 final int keyCode = event.getKeyCode(); in onKeyDown() local
261 if (isGameKey(keyCode)) { in onKeyDown()
263 final String symbolicName = KeyEvent.keyCodeToString(keyCode); in onKeyDown()
264 mKeys.put(keyCode, 1); in onKeyDown()
273 final int keyCode = event.getKeyCode(); in onKeyUp() local
274 if (isGameKey(keyCode)) { in onKeyUp()
275 int index = mKeys.indexOfKey(keyCode); in onKeyUp()
277 final String symbolicName = KeyEvent.keyCodeToString(keyCode); in onKeyUp()
278 mKeys.put(keyCode, 0); in onKeyUp()
314 private static boolean isGameKey(int keyCode) { in isGameKey() argument
[all …]
DGameView.java118 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
124 switch (keyCode) { in onKeyDown()
146 if (isFireKey(keyCode)) { in onKeyDown()
157 return super.onKeyDown(keyCode, event); in onKeyDown()
161 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
166 switch (keyCode) { in onKeyUp()
188 if (isFireKey(keyCode)) { in onKeyUp()
197 return super.onKeyUp(keyCode, event); in onKeyUp()
200 private static boolean isFireKey(int keyCode) { in isFireKey() argument
201 return KeyEvent.isGamepadButton(keyCode) in isFireKey()
[all …]
DList12.java70 public boolean onKey(View v, int keyCode, KeyEvent event) { in onKey() argument
72 switch (keyCode) { in onKey()
DInternalSelectionView.java203 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
/development/cmds/monkey/src/com/android/commands/monkey/
DMonkeySourceNetwork.java213 int keyCode = getKeyCode(command.get(2)); in translateCommand() local
214 if (keyCode < 0) { in translateCommand()
219 Log.d(TAG, "keycode: " + keyCode); in translateCommand()
230 queue.enqueueEvent(new MonkeyKeyEvent(action, keyCode)); in translateCommand()
244 int keyCode = -1; in getKeyCode() local
246 keyCode = Integer.parseInt(keyName); in getKeyCode()
250 keyCode = MonkeySourceRandom.getKeyCode(keyName); in getKeyCode()
251 if (keyCode == KeyEvent.KEYCODE_UNKNOWN) { in getKeyCode()
257 keyCode = MonkeySourceRandom.getKeyCode("KEYCODE_" + keyName.toUpperCase()); in getKeyCode()
258 if (keyCode == KeyEvent.KEYCODE_UNKNOWN) { in getKeyCode()
[all …]
DMonkeyKeyEvent.java41 public MonkeyKeyEvent(int action, int keyCode) { in MonkeyKeyEvent() argument
42 this(-1, -1, action, keyCode, 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0); in MonkeyKeyEvent()
46 int keyCode, int repeatCount, int metaState, in MonkeyKeyEvent() argument
52 mKeyCode = keyCode; in MonkeyKeyEvent()
DMonkeySourceScript.java683 int keyCode = MonkeySourceRandom.getKeyCode(key_name); in handleEvent() local
684 if (keyCode == KeyEvent.KEYCODE_UNKNOWN) { in handleEvent()
687 MonkeyKeyEvent e = new MonkeyKeyEvent(KeyEvent.ACTION_DOWN, keyCode); in handleEvent()
689 e = new MonkeyKeyEvent(KeyEvent.ACTION_UP, keyCode); in handleEvent()
/development/samples/ApiDemos/src/com/example/android/apis/graphics/
DSweep.java83 @Override public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
84 switch (keyCode) { in onKeyDown()
94 return super.onKeyDown(keyCode, event); in onKeyDown()
DUnicodeChart.java101 @Override public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
102 switch (keyCode) { in onKeyDown()
116 return super.onKeyDown(keyCode, event); in onKeyDown()
DPathEffects.java91 @Override public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
92 switch (keyCode) { in onKeyDown()
97 return super.onKeyDown(keyCode, event); in onKeyDown()
DTouchRotateActivity.java122 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
125 return super.onKeyDown(keyCode, event); in onKeyDown()
/development/samples/Snake/src/com/example/android/snake/
DSnake.java123 public boolean onKeyDown(int keyCode, KeyEvent msg) { in onKeyDown() argument
125 switch (keyCode) { in onKeyDown()
140 return super.onKeyDown(keyCode, msg); in onKeyDown()
/development/samples/ControllerSample/src/com/example/controllersample/
DGameView.java128 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
132 if (currentShip.onKeyDown(keyCode, event)) { in onKeyDown()
138 return super.onKeyDown(keyCode, event); in onKeyDown()
142 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
146 if (currentShip.onKeyUp(keyCode, event)) { in onKeyUp()
152 return super.onKeyUp(keyCode, event); in onKeyUp()
491 private static boolean isFireKey(int keyCode) { in isFireKey() argument
492 return KeyEvent.isGamepadButton(keyCode) in isFireKey()
493 || keyCode == KeyEvent.KEYCODE_DPAD_CENTER in isFireKey()
494 || keyCode == KeyEvent.KEYCODE_SPACE; in isFireKey()
[all …]
/development/apps/NinePatchLab/src/com/android/ninepatch/
DNinePatchLab.java169 @Override public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
170 switch (keyCode) { in onKeyDown()
198 return super.onKeyDown(keyCode, event); in onKeyDown()
200 return super.onKeyDown(keyCode, event); in onKeyDown()
/development/samples/Wiktionary/src/com/example/android/wiktionary/
DLookupActivity.java119 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
121 if (keyCode == KeyEvent.KEYCODE_BACK && !mHistory.empty()) { in onKeyDown()
127 return super.onKeyDown(keyCode, event); in onKeyDown()
139 return super.onKeyDown(keyCode, event); in onKeyDown()
/development/apps/OBJViewer/com/android/objviewer/
DOBJViewer.java105 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
107 if (glView.processKey(keyCode)) { in onKeyDown()
111 switch (keyCode) { in onKeyDown()
138 return super.onKeyDown(keyCode, event); in onKeyDown()
/development/samples/browseable/MediaRouter/src/com.example.android.mediarouter/player/
DMainActivity.java462 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
463 return handleMediaKey(event) || super.onKeyDown(keyCode, event); in onKeyDown()
467 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
468 return handleMediaKey(event) || super.onKeyUp(keyCode, event); in onKeyUp()
/development/apps/DumpViewer/app/src/main/java/com/android/dumpviewer/
DDumpActivity.java304 public boolean onAutocompleteKey(View view, int keyCode, KeyEvent keyevent) { in onAutocompleteKey() argument
305 if (keyevent.getAction() == KeyEvent.ACTION_DOWN && keyCode == KeyEvent.KEYCODE_ENTER) { in onAutocompleteKey()