From RAGE Multiplayer Wiki
Revision as of 02:12, 13 May 2018 by MrPancakers (talk | contribs) (Swapped from old template)
Jump to navigation Jump to search

Returns true if the key specific is pressed. Otherwise, returns false.


  • keycode - code of the key (Number).


An interval that runs every half-second and outputs the state of the F2 key (pressed or not).

setInterval(() => {
    if (mp.keys.isDown(112) === true) { // 112 is the key code for F2'F2 key is pressed!');
    } else {'F2 key is not pressed!');
}, 500);

See also