@Environment(value=CLIENT) public final class ScreenKeyboardEvents extends Object
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.ScreenEvents
Modifier and Type | Class and Description |
---|---|
static interface |
ScreenKeyboardEvents.AfterKeyPress |
static interface |
ScreenKeyboardEvents.AfterKeyRelease |
static interface |
ScreenKeyboardEvents.AllowKeyPress |
static interface |
ScreenKeyboardEvents.AllowKeyRelease |
static interface |
ScreenKeyboardEvents.BeforeKeyPress |
static interface |
ScreenKeyboardEvents.BeforeKeyRelease |
Modifier and Type | Method and Description |
---|---|
static Event<ScreenKeyboardEvents.AfterKeyPress> |
afterKeyPress(net.minecraft.client.gui.screen.Screen screen)
An event that is called after a key press is processed for a screen.
|
static Event<ScreenKeyboardEvents.AfterKeyRelease> |
afterKeyRelease(net.minecraft.client.gui.screen.Screen screen)
An event that is called after the release a key is processed for a screen.
|
static Event<ScreenKeyboardEvents.AllowKeyPress> |
allowKeyPress(net.minecraft.client.gui.screen.Screen screen)
An event that checks if a key press should be allowed.
|
static Event<ScreenKeyboardEvents.AllowKeyRelease> |
allowKeyRelease(net.minecraft.client.gui.screen.Screen screen)
An event that checks if a pressed key should be allowed to release.
|
static Event<ScreenKeyboardEvents.BeforeKeyPress> |
beforeKeyPress(net.minecraft.client.gui.screen.Screen screen)
An event that is called before a key press is processed for a screen.
|
static Event<ScreenKeyboardEvents.BeforeKeyRelease> |
beforeKeyRelease(net.minecraft.client.gui.screen.Screen screen)
An event that is called after the release of a key is processed for a screen.
|
public static Event<ScreenKeyboardEvents.AllowKeyPress> allowKeyPress(net.minecraft.client.gui.screen.Screen screen)
public static Event<ScreenKeyboardEvents.BeforeKeyPress> beforeKeyPress(net.minecraft.client.gui.screen.Screen screen)
public static Event<ScreenKeyboardEvents.AfterKeyPress> afterKeyPress(net.minecraft.client.gui.screen.Screen screen)
public static Event<ScreenKeyboardEvents.AllowKeyRelease> allowKeyRelease(net.minecraft.client.gui.screen.Screen screen)
public static Event<ScreenKeyboardEvents.BeforeKeyRelease> beforeKeyRelease(net.minecraft.client.gui.screen.Screen screen)
public static Event<ScreenKeyboardEvents.AfterKeyRelease> afterKeyRelease(net.minecraft.client.gui.screen.Screen screen)