private void invokeTimedActions(int hash, long time, boolean pressed) {
        if (!bindings.containsKey(hash)) {
            return;
        }

        if (pressed) {
            pressedButtons.put(hash, time);
        } else {
            Long pressTimeObj = pressedButtons.remove(hash);
            if (pressTimeObj == null) {
                return; // under certain circumstances it can be null, ignore
            }                        // the event then.

            long pressTime = pressTimeObj;
            long lastUpdate = lastLastUpdateTime;
            long releaseTime = time;
            long timeDelta = releaseTime - Math.max(pressTime, lastUpdate);

            if (timeDelta > 0) {
                invokeAnalogs(hash, computeAnalogValue(timeDelta), false);
            }
        }
    }
Initializes the InputManager.

<p>This should only be called internally in {@link Application}.

@param mouse (not null, alias created)
@param keys (not null, alias created)
@param joystick (may be null, alias created)
@param touch (may be null, alias created)
@throws IllegalArgumentException If either mouseInput or keyInput are null.
jme3-core/src/main/java/com/jme3/input/InputManager.java