Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
data class InputBind(val boundKey: InputConstants.Key, val action: InputBind.BindAction, val modifiers: Set<InputBind.Modifier>) : Record

Data class representing a key binding. It holds the key to be bound and the action that will be triggered by the binding.

Link copied to clipboard

Singleton object that tracks the state of mouse buttons and key presses. It listens for mouse button events and provides utility functions to check if a key or mouse button is currently pressed or was recently pressed.

Properties

Link copied to clipboard
Link copied to clipboard

Retrieves a set of reduced mouse input names available in InputUtil.

Link copied to clipboard

Retrieves a set of reduced keyboard input names available in InputUtil.

Link copied to clipboard
val InputConstants.Key.isPressed: Boolean

Checks whether this key is currently pressed.

Functions

Link copied to clipboard

Binds to the given input name.

fun Value<InputBind>.bind(key: InputConstants.Key, action: InputBind.BindAction, modifiers: Set<InputBind.Modifier>)

Binds to the given input type and code.

Link copied to clipboard
fun inputByName(name: String): InputConstants.Key

Translates a key name to an InputUtil.Key using GLFW key codes. If the name is unrecognized, defaults to NONE.

Link copied to clipboard
fun reduceInputName(translationKey: String): String

Reduces a full key name (e.g., "key.keyboard.a") to its minimal form (e.g., "a"). This is useful for simplifying key names for easier recognition.

Link copied to clipboard
fun InputBind.renderText(): Component
Link copied to clipboard
fun InputConstants.Key.toModifierOrNull(): InputBind.Modifier?

Try to parse the key into InputBind.Modifier instance.

Link copied to clipboard

Unbinds the key by setting it to UNKNOWN_KEY.