Plot:Keyval

From OHRRPGCE-Wiki

Jump to: navigation, search
keyval (scancode)

Returns a bitmask for the state of the specified key. The argument is a scancode, see key is pressed. The first (least significant) bit is whether the key was depressed at the beginning of the current tick. The second bit is whether the key was pushed down by the player since the start of the previous tick (or when the key starts to repeatedly trigger after being held down for a while). It can therefore return 0, 1, 2 or 3:


0 = not pressed

1 = key held down since last tick, but is not a new press

2 = the player pressed the key and released it, all in the same tick

3 = new keypress (or typematic repeat)

Just like key is pressed, this command does not return real time data, but the situation at the beginning of the current game tick.
The joystick scancodes described in key is pressed do not work in this command.

[edit] See Also

Personal tools