http://wiki.spheredev.org/index.php?title=Legacy:Functions/Input/Keyboard&feed=atom&action=historyLegacy:Functions/Input/Keyboard - Revision history2024-03-28T20:52:48ZRevision history for this page on the wikiMediaWiki 1.29.0http://wiki.spheredev.org/index.php?title=Legacy:Functions/Input/Keyboard&diff=526&oldid=prevApollolux: created2013-05-30T23:06:00Z<p>created</p>
<p><b>New page</b></p><div>=== Keyboard ===<br />
==== Key code translation ====<br />
* [[API:GetKeyString|GetKeyString]](''key'', ''shift''): Converts the given ''key'' into a string, KEY_A will become "a", etc. If shift is true, returns uppercase/special value of key. Control keys return an empty string.<br />
<br />
==== Key status ====<br />
* [[API:IsAnyKeyPressed|IsAnyKeyPressed]](): Check if any key is being held down.<br />
* [[API:IsKeyPressed|IsKeyPressed]](''key''): Check if the given ''key'' is being held down.<br />
<br />
* [[API:GetToggleState|GetToggleState]](''key''): Checks if Caps Lock, Num Lock or Scroll Lock are active.<br />
* Allowed key values:<br />
** <var>KEY_CAPSLOCK</var><br />
** <var>KEY_NUMLOCK</var><br />
** <var>KEY_SCROLLOCK (Note: only two Ls)</var><br />
<br />
==== Key queue ====<br />
* [[API:AreKeysLeft|AreKeysLeft]](): Check if keys are left in the key buffer.<br />
* [[API:GetKey|GetKey]](): Get a key from the key buffer, waits for one if there isn't.</div>Apollolux