Class RegisterKeyMappingsEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent
All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent

public class RegisterKeyMappingsEvent extends net.neoforged.bus.api.Event implements net.neoforged.fml.event.IModBusEvent
Allows users to register custom key mappings.

This event is not cancellable, and does not

invalid reference
have a result
.

This event is fired on the mod-specific event bus, only on the logical client.

  • Field Details

    • options

      private final Options options
  • Constructor Details

    • RegisterKeyMappingsEvent

      @Internal public RegisterKeyMappingsEvent(Options options)
  • Method Details

    • register

      public void register(KeyMapping key)
      Registers a new key mapping.