Flux.Binds classclient
Part of Flow
Key binds that Flux handles itself, independently of the binds in the settings of the game.
A bind ties a button (a KEY_ or MOUSE_ code) to a console command. Plugins add their
default binds on the client with Flux.Binds:add_bind, for example
Flux.Binds:add_bind('ToggleThirdPerson', 'fl_third_person', KEY_P). When a player presses
a button, the server tells their client which one, and the client runs the console command
that is bound to it, if any. A command can only be bound to one button at a time. The
library itself only exists on the client.
Summary
Methods
Methods
Adds a default key bind for a console command.
Flux.Binds:add_bind('ToggleThirdPerson', 'fl_third_person', KEY_P)
Parameters
- _id String name of the bind, unused
- command String console command to run when the button is pressed
- key Number button code, see the KEY and MOUSE enumerations
Returns all of the Flux key binds.
Returns
- Map console commands by button code
Returns the console command bound to the specified button with Flux binds.
Parameters
- key Number button code, see the KEY and MOUSE enumerations
Returns
- String console command, or nil if nothing is bound
Returns the buttons that have something bound to them in the game's own settings.
Returns
- Map engine bindings (String) by button code
Returns the names of all of the keyboard and mouse button enumerations.
Returns
- Map enumeration names (such as 'KEY_N') by button code
Returns the buttons whose binding in the game's own settings is a number rather than a command.
Returns
- Map engine bindings by button code
Binds a console command to the specified button, removing its previous bind.
Parameters
- command String console command to run when the button is pressed
- key Number button code, see the KEY and MOUSE enumerations