Пример #1
0
 public final void onKeyDown(LKey e) {
   keySize = keyActions.size();
   if (keySize > 0) {
     int keyCode = e.getKeyCode();
     for (int i = 0; i < keySize; i++) {
       Integer code = (Integer) keyActions.getKey(i);
       if (code == keyCode) {
         ActionKey act = (ActionKey) keyActions.getValue(code);
         act.press();
       }
     }
   }
   press(e);
 }
Пример #2
0
 public void pressActionKey(Integer keyCode) {
   ActionKey key = (ActionKey) keyActions.getValue(keyCode);
   if (key != null) {
     key.press();
   }
 }