CommonKeyCode¶
@Serializable
data class CommonKeyCode(
val type: CommonKeyCode.Type,
val key: Int,
val modifiers: Set<CommonKeyCode.Modifier>
)
A serializable, client-independent representation of a keybind, used by DataSpec.keycode fields so config files don't depend on Cloth Config's ModifierKeyCode. Convert to/from the client type with toClient/toCommon.
Constructors¶
CommonKeyCode¶
constructor(
type: CommonKeyCode.Type,
key: Int,
modifiers: Set<CommonKeyCode.Modifier>
)
constructor(
type: CommonKeyCode.Type,
key: Int,
vararg modifiers: CommonKeyCode.Modifier
)
Types¶
Companion¶
object Companion
Modifier¶
@Serializable
enum Modifier : Enum<CommonKeyCode.Modifier>
A modifier key held alongside the base key.
Type¶
@Serializable
enum Type : Enum<CommonKeyCode.Type>
Which InputConstants key space key is a code in.
Properties¶
key¶
modifiers¶
type¶
val type: CommonKeyCode.Type
Functions¶
toClient¶
fun CommonKeyCode.toClient(): ModifierKeyCode
Converts this to Cloth Config's client-side ModifierKeyCode.