Skip to content

InputEvent

sealed class InputEvent

Base class for all events dispatched through the composable input system.

Events propagate through the node tree from the innermost child outward. Once consume is called the propagation stops for most event types. The bypassSuper flag additionally controls whether the originating net.minecraft.client.gui.screens.Screen method forwards the event to its Minecraft super implementation.

Inheritors

Functions

consume

fun consume(bypassSuperCall: Boolean = false)

Marks this event as consumed, stopping further propagation.

Parameters

  • bypassSuperCall: When true, the corresponding screen method will return true instead of delegating to the super implementation. Use this when the UI has fully handled a keyboard or mouse event and the vanilla logic should be suppressed.