public void keyUp(int key) { keys.removeValue(key); }
@Override public V remove(int key) { final V result = super.remove(key); sortedKeys.removeValue(key); sortedKeys.sort(); return result; }
/** * Enable or disable key repeat for the specified NON-PRINTABLE key. Only keys whose character would return true for * {@link Character#isISOControl(char)} are allowed. The reason why is that LibGDX already repeats printable * characters * for you automatically. * * @param gdxKeyCode The {@link com.badlogic.gdx.Input.Keys} keyCode of the key to repeat. Must be a NON-PRINTABLE * key (See above). * @param isEnabled Whether to enable or disable key repeat for the specified key. */ public void setKeyRepeat(final int gdxKeyCode, final boolean isEnabled) { checkKeyCode(gdxKeyCode); if (isEnabled && !repeatingKeys.contains(gdxKeyCode)) { repeatingKeys.add(gdxKeyCode); registerKeyRepeatTask(gdxKeyCode); } else if (!isEnabled && repeatingKeys.contains(gdxKeyCode)) { repeatingKeys.removeValue(gdxKeyCode); } }
/** * Enable or disable key repeat for the specified NON-PRINTABLE key. Only keys whose character would return true for * {@link Character#isISOControl(char)} are allowed. The reason why is that LibGDX already repeats printable * characters * for you automatically. * * @param gdxKeyCode The {@link com.badlogic.gdx.Input.Keys} keyCode of the key to repeat. Must be a NON-PRINTABLE * key (See above). * @param isEnabled Whether to enable or disable key repeat for the specified key. */ public void setKeyRepeat(final int gdxKeyCode, final boolean isEnabled) { checkKeyCode(gdxKeyCode); if (isEnabled && !repeatingKeys.contains(gdxKeyCode)) { repeatingKeys.add(gdxKeyCode); registerKeyRepeatTask(gdxKeyCode); } else if (!isEnabled && repeatingKeys.contains(gdxKeyCode)) { repeatingKeys.removeValue(gdxKeyCode); } }