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); }
public void pressActionKey(Integer keyCode) { ActionKey key = (ActionKey) keyActions.getValue(keyCode); if (key != null) { key.press(); } }