Basics
Guides
API Reference
Basics
Guides
API Reference
[16:7] extends: FxObj
Wraps FXGL's KeyTrigger (com.almasb.fxgl.input.KeyTrigger), a data class pairing a KeyCode with an optional InputModifier (NONE / CTRL / SHIFT / ALT). KeyTrigger implements the Trigger interface and is the canonical "Ctrl+S" style binding object for Input.addAction and Input.rebind.
KeyTrigger (string KeyName = "SPACE", string ModifierName = "NONE")
Creates a new KeyTrigger from a KeyCode name plus an optional modifier name.
KeyName is the KeyCode enum name (e.g. "S", "SPACE").ModifierName is the InputModifier name ("NONE", "CTRL", "SHIFT", "ALT"). Defaults to "NONE".adopt (object Ajo)
Wraps an existing KeyTrigger AussomJavaObject.
Ajo is an AussomJavaObject around a KeyTrigger.A new wrapper.getName ()
Returns the JavaFX KeyCode label for this trigger's key (e.g. "S", "Space"). Note: this does not include the modifier prefix — call toString() on the underlying AJO (e.g.
kt.obj.invoke("toString")) to read the "CTRL+S" style combined label.
getKey ()
Returns the KeyCode AussomJavaObject.
getModifier ()
Returns the InputModifier AussomJavaObject.
isKey ()
Returns true (KeyTrigger is always key-typed).
isButton ()
Returns false (KeyTrigger is never button-typed).
isTriggered (object EventObj)
Returns true when the given JavaFX InputEvent matches both the key and the modifier of this trigger.
EventObj is an AussomJavaObject around an InputEvent.A bool.isReleased (object EventObj)
Returns true when the given JavaFX InputEvent matches a release of this trigger (either the key released or the modifier key released).
EventObj is an AussomJavaObject around an InputEvent.A bool.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.