module Crame::Keyboard

Overview

The Keyboard module contains all the functions that allow you to use your keyboard in your game (mainly #down?, #pressed? and #released?).

Extended Modules

Defined in:

crame/keyboard.cr

Instance Method Summary

Instance Method Detail

def down?(key : Key) : Bool #

Returns true if the key is held down, false otherwise.


def pressed?(key : Key) : Bool #

Returns true if the key has just been pressed, false otherwise.


def released?(key : Key) : Bool #

Returns true if the key has just been released, false otherwise.