UnbindKey: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Removes an existing key bind from the specified player. | Removes an existing key bind from the specified player. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">unbindKey ( player thePlayer, string key, [ | <syntaxhighlight lang="lua">unbindKey ( player thePlayer, string key, [ bool keyState, string function ] ) </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
Line 11: | Line 10: | ||
===Optional Arguments=== | ===Optional Arguments=== | ||
*'''keyState:''' A | *'''keyState:''' A boolean value representing the "hit-state" of the key. | ||
*''' | *'''function:''' The function you wish to unbind. | ||
Note: The function will only compare values specified, eg: you could bind 1 key to 2 functions and remove them both by not specifying a function. | |||
==Example== | ==Example== | ||
==See Also== | ==See Also== | ||
{{Input functions}} | {{Input functions}} |
Revision as of 13:14, 10 October 2006
Removes an existing key bind from the specified player.
Syntax
unbindKey ( player thePlayer, string key, [ bool keyState, string function ] )
Required Arguments
- thePlayer: The player you wish to unbind the key of.
- key: The key you wish to unbind. See Key names for a list of valid key names.
Optional Arguments
- keyState: A boolean value representing the "hit-state" of the key.
- function: The function you wish to unbind.
Note: The function will only compare values specified, eg: you could bind 1 key to 2 functions and remove them both by not specifying a function.
Example
See Also
- addCommandHandler
- bindKey
- executeCommandHandler
- getCommandHandlers
- getFunctionsBoundToKey
- getKeyBoundToFunction
- isControlEnabled
- removeCommandHandler
- toggleAllControls
- toggleControl
- unbindKey