The dot itself will be drawn in green, unless the spacebar is held down. If so, draw the dot in red.
Take your time to examine these methods:
Kb.bp(KB_N) // true if N was pressed down in this frame.
Kb.br(KB_E) // true if E was released in this frame.
Kb.b (KB_R) // true while R is being held down
Kb.bd(KB_D) // true if a double tap occurred on D
5
Even though we use the object Kb instead of Ms, most functions are exactly the same. But instead of using the number of a mouse button as an argument, you will now enter a keyboard code. This code will always start with KB_, followed by a character or a number. Other options are:
Functions | Control | Modifiers | Arrows | Numpad
|
| KB_F1 | KB_ESC | KB_LCTRL | KB_LEFT | KB_NPDIV |
| KB_F2 | KB_ENTER | KB_RCTRL | KB_RIGHT | KB_NPENTER |
| … | KB_SPACE | KB_LSHIFT | KB_UP | KB_NP1 |
| KB_F12 | KB_BACK | KB_RSHIFT | KB_DOWN | KB_NP2 |
| KB_TAB | … | … | ||
A complete list of all keys can be found at Esenthel Engine ⇒ Input ⇒ Input Buttons.
The dot itself will be drawn in green, unless the spacebar is held down. If so, draw the dot in red.