public boolean isValidCommand(String command, boolean allowRepeats) { ArrayList<KeyCodes> keyList = keyMap.get(command); if(null == keyList) { return false; } if ( keyList.isEmpty() ) { return true; }  for(int i = 0, max = keyList.size(); i < max; i++) { int[] keycodes = keyList.get(i).keys; boolean value = true;  for(int j = 0; value && j < keycodes.length; j++) { if (allowRepeats) value = KeyInput.get().isKeyDown(keycodes[j]); else value = getStickyKey(keycodes[j]); }  if (value) { return true; } }  return false; }
public boolean isValidCommand(String command) { return isValidCommand(command, true); }
    public boolean isValidCommand(String command, boolean allowRepeats) {        ArrayList<KeyCodes> keyList = keyMap.get(command);        if(null == keyList) {            return false;        }        if ( keyList.isEmpty() )        {            return true; //is this desired? (it was the previous behaviour)        }        for(int i = 0, max = keyList.size(); i < max; i++) {            int[] keycodes = keyList.get(i).keys;            boolean value = true;            for(int j = 0; value && j < keycodes.length; j++) {              if (allowRepeats)                value = KeyInput.get().isKeyDown(keycodes[j]);              else                value = getStickyKey(keycodes[j]);            }            if (value) {                return true;            }        }        return false;    }