Skip to content

MCM_Keycode

github-actions[bot] edited this page Jul 19, 2026 · 1 revision

Inherits: MCM_Value < MCM_Type

Description

Allows players the input a custom keybind as a value.

Properties

Type Name
MCM_Key_Types DefaultType
MCM_Modifiers[] DefaultModifiers

Constructors

Return Value Name and Parameters
MCM_Keycode MCM_Keycode(id: String, name: String, tooltip: String, default: Key, defaultType: MCM_Key_Types)

Methods

Return Value Name and Parameters
MCM_Keycode setDefaultModifiers(defaultModifiers: MCM_Modifiers[])
MCM_Keycode addAltModifier()
MCM_Keycode addControlModifier()
MCM_Keycode addMetaModifier()
MCM_Keycode addShiftModifier()
Dictionary createConfigObject() const

Property Descriptions

MCM_Key_Types DefaultType

 The input type the default key is set to.


MCM_Modifiers[] DefaultModifiers

 The default modifier keys that need to be pressed alongside the default key to register as an input.

Constructor Descriptions

MCM_Keycode MCM_Keycode(id: String, name: String, tooltip: String, default: Key, defaultType: MCM_Key_Types)

 Constructs an MCM_Key and sets the DefaultType properties. And then sends section, id, name, tooltip, and default parameters to the inherited MCM_Value constructor.

Method Descriptions

MCM_Keycode setDefaultModifiers(defaultModifiers: MCM_Modifiers[])

 Set the default modifiers that need to be pressed alongside the assigned keycode. Will also validate a modifier isn't being added that is the same as the assigned default key.


MCM_Keycode addAltModifier()

 Add the alt key to be pressed as a modifier alongside the assigned keycode. Will also validate a modifier isn't being added that is the same as the assigned default key.


MCM_Keycode addControlModifier()

 Add the control key to be pressed as a modifier alongside the assigned keycode. ill also validate a modifier isn't being added that is the same as the assigned default key.


MCM_Keycode addMetaModifier()

 Add the meta/windows key to be pressed as a modifier alongside the assigned keycode. Will also validate a modifier isn't being added that is the same as the assigned default key.


MCM_Keycode addShiftModifier()

 Add the shift key to be pressed as a modifier alongside the assigned keycode. Will also validate a modifier isn't being added that is the same as the assigned default key.

Clone this wiki locally