mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-22 20:30:22 +00:00
Handle more key codes
This commit is contained in:
parent
e5fde057c9
commit
99d9c3510e
@ -176,6 +176,10 @@ public class Apple2Activity extends Activity {
|
||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
maybeQuitApp();
|
||||
} else if (keyCode == KeyEvent.KEYCODE_MENU) {
|
||||
mView.showMainMenu();
|
||||
} else if ((keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) || (keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) || (keyCode == KeyEvent.KEYCODE_VOLUME_UP)) {
|
||||
return false;
|
||||
}
|
||||
nativeOnKeyUp(keyCode, event.getMetaState());
|
||||
return true;
|
||||
|
@ -181,6 +181,10 @@ class Apple2View extends GLSurfaceView {
|
||||
}
|
||||
}
|
||||
|
||||
public Apple2MainMenu getMainMenu() {
|
||||
return mMainMenu;
|
||||
}
|
||||
|
||||
public void toggleMultiTapMenu() {
|
||||
InputMethodManager inputMethodManager=(InputMethodManager)mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
inputMethodManager.toggleSoftInputFromWindow(getApplicationWindowToken(), InputMethodManager.SHOW_FORCED, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user