benilla-re systems structs docs

SetKeyBinding

function · ui · primitive

Address
0x4b7490 · 1020 bytes, up to 0x4b788b
Signature
bool __thiscall (CBindings *this, int set, const char *key, const char *action)
Meaning
Normalizes a key's alias, validates it, then binds or unbinds it in a set
Confidence
verified, proof one
Finding
ui/keybindings#setting-a-binding

Finding: Setting a binding in ui: key bindings

SetBinding(key[, command]) raises unless argument 1 is a string or number. It calls 0x4b7490(3, key, command) on the live set, a missing or non-string command meaning unbind, and returns the number 1 and signals UPDATE_BINDINGS (386) on success, nil and no event on a refusal. The engine first replaces the whole-string aliases LEFTBRACKET, RIGHTBRACKET, SLASH, BACKSLASH, SEMICOLON, APOSTROPHE, COMMA, PERIOD, TILDE, PLUS and MINUS (compared without case) by [, ], /, \, ;, ', ,, ., a backquote, = and -. Then 0x4b7890 is the only thing that can refuse. The command name is never checked.

The derivation is in the doc.

Callers 3

Callees 13

Calls and jumps by a bare address, from tables/calls.tsv.