Package dev.boze.api.event
Class EventBind
java.lang.Object
dev.boze.api.event.CancellableEvent
dev.boze.api.event.EventBind
EventBind
Event fired when a key or mouse button is pressed, repeated, or released
This event allows addons to intercept and modify input binding behavior
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe action that occurredintThe key code or mouse button that was pressed/releasedbooleanWhether this bind represents a mouse button (true) or keyboard key (false)intModifier keys that were held during the action (only applicable for keyboard keys) -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class dev.boze.api.event.CancellableEvent
cancel, isCancelled, setCancelled
-
Field Details
-
bind
public int bindThe key code or mouse button that was pressed/released -
action
public int actionThe action that occurred GLFW_RELEASE = 0 (The key or button was released)
GLFW_PRESS = 1 (The key or button was pressed)
GLFW_REPEAT = 2 (The key was held down until it repeated) -
isButton
public boolean isButtonWhether this bind represents a mouse button (true) or keyboard key (false) -
modifiers
public int modifiersModifier keys that were held during the action (only applicable for keyboard keys)
-
-
Constructor Details
-
EventBind
public EventBind()
-
-
Method Details
-
get
Creates a new EventBind instance- Parameters:
bind- The key code or mouse buttonaction- The action that occurred (GLFW_PRESS, GLFW_RELEASE, GLFW_REPEAT)isButton- Whether this is a mouse button bindingmodifiers- Modifier keys held (0 for mouse buttons)- Returns:
- The EventBind instance
-