getCommandsBoundToKey
Client-side
Server-side
Shared
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
Gets the commands bound to a key.
Syntax
getCommandsBoundToKey ( )Code Examples
client
This example adds the command /keycommands
addCommandHandler ( "keycommands", function ( commandName, theKey, keyState ) if ( theKey and keyState ) then -- We check if theKey and keyState is valid. local commands = getCommandsBoundToKey ( theKey, keyState ) if ( commands and type ( commands ) == "table" ) then for command, state in pairs ( commands ) do outputChatBox ( command ) end end else outputChatBox ( commandName ..": Correct syntax: [ theKey ] [ keyState ]" ) end end)See Also
Input Functions
- addCommandHandler
- bindKey
- executeCommandHandler
- getAnalogControlState
- getBoundKeys
- getCommandHandlers
- getCommandsBoundToKey
- getFunctionsBoundToKey
- getKeyBoundToCommand
- getKeyBoundToFunction
- getKeyState
- isCapsLockEnabled
- isControlEnabled
- isKeyBound
- removeCommandHandler
- setAnalogControlState
- toggleAllControls
- toggleControl
- unbindKey
Input Events
- onClientCharacter
- onClientClick
- onClientCursorMove
- onClientDoubleClick
- onClientGUIAccepted
- onClientGUIBlur
- onClientGUIChanged
- onClientGUIClick
- onClientGUIComboBoxAccepted
- onClientGUIDoubleClick
- onClientGUIFocus
- onClientGUIMouseDown
- onClientGUIMouseUp
- onClientGUIMove
- onClientGUIScroll
- onClientGUISize
- onClientGUITabSwitched
- onClientKey
- onClientMouseEnter
- onClientMouseLeave
- onClientMouseMove
- onClientMouseWheel
- onClientPaste