Keys::unbind
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
}