Class KeyInterceptState

java.lang.Object
com.jme3.app.state.BaseAppState
com.simsilica.lemur.event.KeyInterceptState
All Implemented Interfaces:
AppState

public class KeyInterceptState extends BaseAppState
AppState that registers a RawInputListener with the InputManager so that key events can optionally be received and consumed before normal listeners get them.
  • Constructor Details

    • KeyInterceptState

      public KeyInterceptState(Application app)
  • Method Details

    • addKeyListener

      public void addKeyListener(KeyListener l)
    • removeKeyListener

      public void removeKeyListener(KeyListener l)
    • initialize

      protected void initialize(Application app)
      Description copied from class: BaseAppState
      Called during initialization once the app state is attached and before onEnable() is called.
      Specified by:
      initialize in class BaseAppState
      Parameters:
      app - the application
    • cleanup

      protected void cleanup(Application app)
      Description copied from class: BaseAppState
      Called after the app state is detached or during application shutdown if the state is still attached. onDisable() is called before this cleanup() method if the state is enabled at the time of cleanup.
      Specified by:
      cleanup in class BaseAppState
      Parameters:
      app - the application
    • onEnable

      protected void onEnable()
      Description copied from class: BaseAppState
      Called when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.
      Specified by:
      onEnable in class BaseAppState
    • onDisable

      protected void onDisable()
      Description copied from class: BaseAppState
      Called when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.
      Specified by:
      onDisable in class BaseAppState
    • setModifier

      protected void setModifier(int mask, boolean on)
    • dispatch

      protected void dispatch(KeyInputEvent evt)