Keyboard.isPressed

Returns if the given Keyboard.Code is pressed.

  1. bool isPressed(Code code)
    class Keyboard
    static
    bool
    isPressed
  2. bool isPressed(ScanCode scancode)

Examples

if (Keyboard.isPressed(Keyboard.Code.Escape))
    writeln("escape is pressed.");

Meta