(int keyCode)
| 1198 | private static boolean keyTyped, shiftKeyDown; |
| 1199 | |
| 1200 | @Override |
| 1201 | public boolean keyDown(int keyCode) { |
| 1202 | lastInputWasController = false; |
| 1203 | if (keyCode == Keys.MENU) { |
| 1204 | showMenu(); |
| 1205 | return true; |
| 1206 | } |
| 1207 | if (keyCode == Keys.SHIFT_LEFT || keyCode == Keys.SHIFT_RIGHT) { |
| 1208 | shiftKeyDown = true; |
| 1209 | } |
| 1210 | |
| 1211 | if (keyCode == Keys.LEFT || keyCode == Keys.RIGHT || keyCode == Keys.UP || keyCode == Keys.DOWN) |
| 1212 | if(emulateSwipe(keyCode)) |
| 1213 | return true; |
| 1214 | |
| 1215 | if (keyCode == Keys.BACK) { |
| 1216 | if ((destroyThis && !isMobileAdventureMode) || (splashScreen != null && splashScreen.isShowModeSelector())) |
| 1217 | exitAnimation(false); |
| 1218 | else if (onHomeScreen() && isLandscapeMode()) |
| 1219 | back(); |
| 1220 | } |
| 1221 | if (keyInputAdapter == null) { |
| 1222 | if (KeyInputAdapter.isModifierKey(keyCode)) { |
| 1223 | return false; //don't process modifiers keys for unknown adapter |
| 1224 | } |
| 1225 | //if no active key input adapter, give current screen or overlay a chance to handle key |
| 1226 | FContainer container = FOverlay.getTopOverlay(); |
| 1227 | if (container == null) { |
| 1228 | container = currentScreen; |
| 1229 | if (container == null) { |
| 1230 | return false; |
| 1231 | } |
| 1232 | } |
| 1233 | return container.keyDown(keyCode); |
| 1234 | } |
| 1235 | return keyInputAdapter.keyDown(keyCode); |
| 1236 | } |
| 1237 | |
| 1238 | private boolean emulateSwipe (int keyCode) { |
| 1239 | // Cursor keys emulate swipe gestures |
nothing calls this directly
no test coverage detected