mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-09-28 16:54:51 +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) {
|
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
maybeQuitApp();
|
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());
|
nativeOnKeyUp(keyCode, event.getMetaState());
|
||||||
return true;
|
return true;
|
||||||
|
@ -181,6 +181,10 @@ class Apple2View extends GLSurfaceView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Apple2MainMenu getMainMenu() {
|
||||||
|
return mMainMenu;
|
||||||
|
}
|
||||||
|
|
||||||
public void toggleMultiTapMenu() {
|
public void toggleMultiTapMenu() {
|
||||||
InputMethodManager inputMethodManager=(InputMethodManager)mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager inputMethodManager=(InputMethodManager)mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
inputMethodManager.toggleSoftInputFromWindow(getApplicationWindowToken(), InputMethodManager.SHOW_FORCED, 0);
|
inputMethodManager.toggleSoftInputFromWindow(getApplicationWindowToken(), InputMethodManager.SHOW_FORCED, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user