Skip to content

tes3quickKey⚓︎

A configuration detailing a quick key.

Note

Storing an item in a quick key won't attach any itemData to the item, while equipping the item will.

Properties⚓︎

item⚓︎

Read-only. The raw item bound to the quick key. To change its value, use either the setItem or setMagic methods.

Returns:


itemData⚓︎

Read-only. The raw item data bound to the quick key. To change its value, use either the setItem or setMagic methods.

Returns:


spell⚓︎

Read-only. The raw spell bound to the quick key. To change its value, use the setMagic method.

Returns:


type⚓︎

Read-only. The type of the quick key, with the numeric value matching tes3.quickKeyType constants.

Returns:


Methods⚓︎

clear⚓︎

Unbinds the quick key, removing any data in it.

myObject:clear()

getItem⚓︎

Gets the item associated with the given quick key. If the quick key is not marked as an item, this will return nil. This is equivalent to fetching the item and itemData properties, after checking to make sure the type is set to item.

local source, data = myObject:getItem()

Returns:

  • source (tes3item, nil): The item bound to the quick key.
  • data (tes3itemData, nil): Any associated item data bound to the quick key

getMagic⚓︎

Gets the magic associated with the given quick key. If the quick key is not marked as magic, this will return nil. This is equivalent to fetching either the spell or item properties and the itemData property, after checking to make sure the type is set to magic.

local source, data = myObject:getMagic()

Returns:

  • source (tes3spell, tes3item, nil): The castable source bound to the quick key.
  • data (tes3itemData, nil): Any associated item data bound to the quick key

setItem⚓︎

Sets the binding of the quick key to a given item source.

myObject:setItem(source, data)

Parameters:

  • source (tes3item): The item to be bound to the quick key.
  • data (tes3itemData, nil): The optional item data to be paired with the binding.

setMagic⚓︎

Sets the binding of the quick key to a given magic source. This must be a spell, or an item with an on-use enchantment.

myObject:setMagic(source, data)

Parameters:

  • source (tes3spell, tes3item): The castable source to be bound to the quick key.
  • data (tes3itemData, nil): If given an item as the source, the optional item data to be paired with the binding.