Keybindings
Index
Type Aliases
Category
Type declaration
readonlyid: chat | maproom | navigation | chatroom | unknown
Unique identifier
optionalreadonlyname?: string | Partial<Record<ServerChatRoomLanguage | TW, string>>
User-facing label
Context
Defines a context in which keybindings can be active.
Type declaration
readonlyid: chat | always | isInChatRoom | isOnChatRoomScreen | isChatRoomCharacterMode | isChatRoomMapMode | isChatRoomChatFocused | isChatRoomChatNOTFocused | noModifiers
Unique identifier
optionalreadonlyname?: string | Partial<Record<ServerChatRoomLanguage | TW, string>>
User-facing label
readonlyprerequisite: (event: KeyboardEvent) => boolean
Function returning true if this context should be considered active
Parameters
event: KeyboardEvent
Returns boolean
optionalreadonlyshowInUI?: boolean
Optional flag whether to show this context in the UI
ContextId
Unique identifier for a keybinding context. Contexts allow the same keybinding to behave differently depending on active UI states or modes.
KeyCode
KeyCombo
Represents a combination of a physical key and optional modifier keys.
keyrefers to thecodeproperty fromKeyboardEvent, notkey. This means the value is hardware-position-based, not character-based. See: https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_valuesmodifiersis an optional set of additional keys (Shift, Alt, Ctrl) that must be pressed alongside the primary key.
Keybinding
Represents a specific keybinding configuration for an action.
Type declaration
readonlyaction: (event: KeyboardEvent) => boolean | void
Function executed when triggered. Returns
trueif handled,falseotherwise.Parameters
event: KeyboardEvent
Returns boolean | void
readonlycategoryId: Category[id]
Category this action belongs to
readonlycontextIds: ContextId[]
Contexts in which the action is valid
optionalreadonlydefaultKeyCombo?: KeyCombo
System’s original mapping for reset purposes
optionalreadonlydescription?: string | Partial<Record<ServerChatRoomLanguage | TW, string>>
Optional description
readonlyid: string
Unique identifier
optionalkeyCombo?: KeyCombo
Currently assigned key combo
optionalreadonlyname?: string | Partial<Record<ServerChatRoomLanguage | TW, string>>
User-facing label
readonlyreadonly: boolean
Flag whether the binding cannot be changed by the user
KeybindingSerialized
A lightweight, serialized form of a keybinding.
Type declaration
actionId: string
Unique identifier
keyCombo: string
String representation of the key combination. (e.g., "KeyK ⌃⇧")
ModifierKey
Allowed modifier keys in this keybinding system. Uses human-readable names to match conceptual rather than platform-specific keys.
UninitializedKeybinding
Type declaration
id: Keybinding[id]
keyCombo: KeyCombo
Groups related actions for easier navigation in a UI (e.g., "Editing", "Navigation").