getKeyBoundToFunction
Client-side
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
getKeyBoundToFunction allows retrieval of the first key bound to a function.
Syntax
string getKeyBoundToFunction ( function theFunction )Required arguments
- theFunction: The function in which you would like to check the bound key
Returns
Returns a string of the first key the function was bound to.
- string: value
Code Examples
client
/key command gives bounded key to our chat function
function chat () outputChatBox("Test")endbindKey("F2","down",chat)
function key() local boundKey = getKeyBoundToFunction(chat) outputChatBox(boundKey)endaddCommandHandler("key",key)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