Blockbench Reference Docs
    Preparing search index...

    A customizable keybind

    Index

    Constructors

    Properties

    alt?: boolean
    ctrl?: boolean
    key: number
    label: string
    shift?: boolean
    variations?: { [key: string]: { description?: string; name: string } }

    Methods

    • Test which variation would be triggered by the event. Returns the ID of the variation if triggered

      Parameters

      • event: Event

        The event to test

      Returns string

    • Test if a variation would be triggered by the event

      Parameters

      • event: Event

        The event to test

      • variation: string

        The variation to test againts

      Returns boolean

    • Get the name of the bound key

      Parameters

      • Optionalkey: string

      Returns string

    • Get display text showing the keybind

      Parameters

      • Optionalformatted: boolean

        If true, the return string will include HTML formatting

      Returns string

    • Save any changes to local storage

      Parameters

      • Optionalsave: false

        Save all keybinding changes to local storage. Set to fales if updating multiple at once

      Returns this

    • Assign an action to the keybind

      Parameters

      • id: string

        ID of the action

      • Optionalsub_id: string

        sub keybind ID

      Returns Keybind

    • Load an included keymap by ID

      Parameters

      • id: string
      • Optionalfrom_start_screen: boolean

      Returns true | void