Basics
Guides
API Reference
Basics
Guides
API Reference
[17:7] extends: FxObj
Wraps FXGL's UserAction, the abstract event target that an Input binds to a KeyCode or MouseButton. Construct one with a name (which doubles as its identity for equals / hashCode) and register Aussom callbacks for the four lifecycle hooks: onActionBegin (the frame the trigger is pressed), onAction (every subsequent frame while held), onActionEnd (the frame the trigger is released), and onDoubleActionBegin (a second press within the double-press window).
UserAction (string Name)
Creates a new UserAction with the given name. The name is used for equality and is shown in default debug overlays.
Name is a string with the action name.getName ()
Returns the action name.
A string with the name.onActionBegin (callback Cb)
Registers the onActionBegin callback (fires once on press).
Cb is a callback with no arguments.this objectonAction (callback Cb)
Registers the onAction callback (fires every frame while held).
Cb is a callback with no arguments.this objectonActionEnd (callback Cb)
Registers the onActionEnd callback (fires once on release).
Cb is a callback with no arguments.this objectonDoubleActionBegin (callback Cb)
Registers the onDoubleActionBegin callback (fires on a second press within the double-press window).
Cb is a callback with no arguments.this object
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.