Class ScreenKeyboardEvents
java.lang.Object
net.fabricmc.fabric.api.client.screen.v1.ScreenKeyboardEvents
Events related to use of the keyboard in a
Screen
.
All of these events work on top of a specific screen instance.
Subscriptions will only last as long as the screen itself, they'll disappear once the screen gets refreshed, closed or replaced.
Use ScreenEvents.BEFORE_INIT
to register the desired events every time it is necessary.
Events are fired in the following order:
AllowX -> BeforeX -> AfterX
If the result of the Allow event is false, then Before and After are not called.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionafterKeyPress
(Screen screen) An event that is called after a key press is processed for a screen.afterKeyRelease
(Screen screen) An event that is called after the release a key is processed for a screen.allowKeyPress
(Screen screen) An event that checks if a key press should be allowed.allowKeyRelease
(Screen screen) An event that checks if a pressed key should be allowed to release.beforeKeyPress
(Screen screen) An event that is called before a key press is processed for a screen.beforeKeyRelease
(Screen screen) An event that is called after the release of a key is processed for a screen.
-
Method Details
-
allowKeyPress
An event that checks if a key press should be allowed.- Returns:
- the event
-
beforeKeyPress
An event that is called before a key press is processed for a screen.- Returns:
- the event
-
afterKeyPress
An event that is called after a key press is processed for a screen.- Returns:
- the event
-
allowKeyRelease
An event that checks if a pressed key should be allowed to release.- Returns:
- the event
-
beforeKeyRelease
An event that is called after the release of a key is processed for a screen.- Returns:
- the event
-
afterKeyRelease
An event that is called after the release a key is processed for a screen.- Returns:
- the event
-