Is your feature request related to a problem? Please describe.
This would be a potentially cool feature if you want to customize your keybinds for a map, especially Nos Astra and debugging tools in maps.
Describe the solution you'd like
This feature revolves around a function named `Lib:KeybindCtrl(mode, name, key). (you can change the name of the function if you want lol)
The mode property has 3 possible values: register, event, and get. If you know Lua garbage collection, you may be familiar with this.
The register mode supports the key argument, where you can set them to any KeyCode enum. To limit potential abuse, only 10 - 20 custom binds can be registered for each round. After a round ends, the game clears all registered custom binds, but with the name argument, the keybind is either saved or cached until it is needed again. Re-registering existing binds ignore the key argument if the player in question already had it cached. This should be the only function available for both the server and client.
For internal and in-game names, it could be formatted like stoptime\Stop Time, with a backslash acting as a separator. The left is the internal name so if you want to get the keybind, you can use `Lib:KeybindCtrl("get", "stopTime"). The other is the name to be used in the keybind settings, so if you want to go and change it, it would be read as 'Stop Time'.
The event mode returns two functions: InputBegan and InputEnded. Their functionalities are self-explanatory.
The get mode only wants the name. It returns the name of the KeyCode assigned to that custom bind.
Additional context
Above this example, the name of the map could be the header for this area, below the separator line as you can see here.
Is your feature request related to a problem? Please describe. This would be a potentially cool feature if you want to customize your keybinds for a map, especially Nos Astra and debugging tools in maps.
Describe the solution you'd like This feature revolves around a function named `Lib:KeybindCtrl(mode, name, key). (you can change the name of the function if you want lol) The mode property has 3 possible values: register, event, and get. If you know Lua garbage collection, you may be familiar with this.
The register mode supports the key argument, where you can set them to any KeyCode enum. To limit potential abuse, only 10 - 20 custom binds can be registered for each round. After a round ends, the game clears all registered custom binds, but with the name argument, the keybind is either saved or cached until it is needed again. Re-registering existing binds ignore the key argument if the player in question already had it cached. This should be the only function available for both the server and client.
For internal and in-game names, it could be formatted like
stoptime\Stop Time
, with a backslash acting as a separator. The left is the internal name so if you want to get the keybind, you can use `Lib:KeybindCtrl("get", "stopTime"). The other is the name to be used in the keybind settings, so if you want to go and change it, it would be read as 'Stop Time'.The event mode returns two functions:
InputBegan
andInputEnded
. Their functionalities are self-explanatory.The get mode only wants the name. It returns the name of the KeyCode assigned to that custom bind.
Additional context Above this example, the name of the map could be the header for this area, below the separator line as you can see here.