five-on-it / apps/client/src/ui/bindings / rebind
Function: rebind()
rebind(
bindings,action,code):Rebound
Defined in: apps/client/src/ui/bindings.ts:120
Binds code as action's own key (its first), its old own key going to whichever action had code (a swap, so no key does two things and no action is left without one). A code that cannot be bound, or that already is the action's own key, changes nothing.
Parameters
bindings
action
"right" | "forward" | "use" | "phone" | "interact" | "cover" | "handbrake" | "reset" | "nextClass" | "run" | "resetLevel" | "left" | "back" | "radio" | "horn" | "music" | "nextSlot" | "radioNext" | "radioPrev" | "prediction" | "latency" | "loss" | "smoothing" | "hud"
code
string