MCPcopy Create free account
hub / github.com/Card-Forge/forge / keyDown

Method keyDown

forge-gui-mobile/src/forge/screens/FScreen.java:401–417  ·  view source on GitHub ↗
(int keyCode)

Source from the content-addressed store, hash-verified

399 }
400
401 @Override
402 public boolean keyDown(int keyCode) {
403 if (keyCode == Keys.ESCAPE || keyCode == Keys.BACK) {
404 if (Forge.endKeyInput()) { return true; }
405
406 if (Forge.isLandscapeMode() && !allowBackInLandscapeMode()) {
407 Forge.exit(false); //prompt to exit if attempting to go back from screen that doesn't allow back in landscape mode
408 return true;
409 }
410 Forge.back(); //go back on escape by default
411 return true;
412 }
413 if (keyCode == Keys.F5) { //allow revalidating current screen when running desktop app
414 revalidate();
415 }
416 return super.keyDown(keyCode);
417 }
418}

Callers

nothing calls this directly

Calls 6

endKeyInputMethod · 0.95
isLandscapeModeMethod · 0.95
exitMethod · 0.95
backMethod · 0.95
revalidateMethod · 0.80

Tested by

no test coverage detected