@Override
    public void onAction(String name, boolean keyPressed, float tpf) {
      if (name.equals("Pause") && !keyPressed) {
        isRunning = !isRunning;
      }
    }
Use this listener for KeyDown/KeyUp events
jme3-examples/src/main/java/jme3test/helloworld/HelloInput.java