Keyboard.isPressed

Returns if the given Keyboard.ScanCode is pressed.

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

Examples

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

Meta