Keys::unbind: Difference between revisions
MrPancakers (talk | contribs) m (Swapped from old template) |
|||
| Line 26: | Line 26: | ||
==See also== | ==See also== | ||
{{ | {{Keys_functions_c}} | ||
Revision as of 02:12, 13 May 2018
This function unbinds the key.
Required Arguments
- keycode - Code of key (Hexadecimal).
- keyhold - Unbind the binds with keyhold-value.
Optional Arguments
- handler - Only unbind this handler.
Example
Client-Side
function checkKeyPressing() {
mp.gui.chat.push( "Pressing F2" );
}
function toggleTestMessageBind ( bool ) {
if ( bool )
mp.keys.bind( 0x71, true, checkKeyPressing ); //bind testMessage to F2
else
mp.keys.unbind( 0x71, true, checkKeyPressing ); //unbind it
}