KeyPressDispatcher
A manager for a keyTypedInputListener, based on HashMap. Uses KeyCharAndCode as keys to express bindings for both Ascii and function keys.
install and uninstall handle adding the listener to a Stage. Use indexed assignments to react to specific keys, e.g.:
keyPressDispatcher[Input.Keys.F1] = { showHelp() }
keyPressDispatcher['+'] = { zoomIn() }
Optionally use setCheckpoint and revertToCheckPoint to remember and restore one state.
Parameters
Optional name of the container screen or popup for debugging
Constructors
Types
Functions
Implements lazy hooking of the listener into the stage.
install our EventListener on a stage with optional inhibitor
Revert to a checkpoint: Remove all mappings except those that existed on a previous setCheckpoint call. If no checkpoint has been set, this is equivalent to clear
Set a checkpoint: The current set of keys will not be removed on a subsequent revertToCheckPoint
uninstall our EventListener from the stage it was installed on.
Properties
Allows temporarily suspending this KeyPressDispatcher