Keybinds

EEex_Keybinds_Cast

Summary

Attempts to cast resref as the leader of the currently selected sprites.

Parameters:

Name

Type

Default Value

Description

resref

string

The resref of the spell to cast.

Return Values:

Type

Description

boolean

true if the casting was started successfully; false otherwise.

EEex_Keybinds_CastTwoStep

Summary

Attempts to cast firstResref → secondResref as the leader of the currently selected sprites.

Parameters:

Name

Type

Default Value

Description

firstResref

string

The resref of the first spell to cast.
This spell should invoke op214.

secondResref

string

The resref of the second spell to cast.
This spell should be provided by the previously invoked op214.

EEex_Keybinds_Get

Summary

Returns a table representing the keybind with the given id.

Parameters:

Name

Type

Default Value

Description

id

string

The unique id of the associated keybind.

Return Values:

Type

Description

table | nil

See summary.


The Keybind Table

Key

Value Type

Description

callback

function

Function that is called when the conditions required by fireType are satisfied.

fireType

EEex_Keybinds_FireType

The situation in which callback is invoked.

keys

table

Table of keycodes defining the keybind's main sequence of keys.
These keys must be pressed in the defined order for the keybind to be satisfied.

modifierKeys

table

Table of keycodes defining the keys that are required to be down when the main sequence is satisfied.
Allowed keys include the left / right variants of Ctrl, Shift, and Alt.


EEex_Keybinds_FireType

Ordinal Name

Description

UP

Fires when any key is released after the keybind has been satisfied.
Additional key presses will cancel the satisfaction of the keybind.

DOWN

Fires when the keybind has been satisfied.

EEex_Keybinds_SelectPortrait

Summary

Attempts to select the portrait in portraitIndex.

Parameters:

Name

Type

Default Value

Description

portraitIndex

number

The index of the portrait to select.

dontUnselect

boolean

false

If true, prevents the deselection of already-selected sprites.
This is analogous to holding Shift in the original keybindings.

EEex_Keybinds_Update

Summary

Updates the keybind with the given id with the fields present in args.

Parameters:

Name

Type

Default Value

Description

id

string

The unique id of the associated keybind.

args

table

A table containing fields used to update the keybind.
See The Keybind Table for more details.