*/
@Override
public void onKeypress(final TKeypressEvent keypress) {
- if (getActiveChild() != null) {
- if (getActiveChild() instanceof TSubMenu) {
+
+ /*
+ System.err.printf("keypress: %s active child: %s\n", keypress,
+ getActiveChild());
+ */
+
+ if (getActiveChild() != this) {
+ if ((getActiveChild() instanceof TSubMenu)
+ || (getActiveChild() instanceof TMenu)
+ ) {
getActiveChild().onKeypress(keypress);
return;
}
return;
}
if (keypress.equals(kbRight)) {
- if (!isSubMenu) {
- getApplication().switchMenu(true);
- }
+ getApplication().switchMenu(true);
return;
}
if (keypress.equals(kbLeft)) {