Difference between revisions of "Legacy:Functions/Input/Keyboard"

From Spherical
Jump to: navigation, search
(created)
 
(No difference)

Latest revision as of 23:06, 30 May 2013

Keyboard

Key code translation

  • 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.

Key status

  • GetToggleState(key): Checks if Caps Lock, Num Lock or Scroll Lock are active.
  • Allowed key values:
    • KEY_CAPSLOCK
    • KEY_NUMLOCK
    • KEY_SCROLLOCK (Note: only two Ls)

Key queue

  • AreKeysLeft(): Check if keys are left in the key buffer.
  • GetKey(): Get a key from the key buffer, waits for one if there isn't.