Keys::unbind

From RAGE Multiplayer Wiki

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.

Keycodes can be found here

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
}

See also