Module OgamlGraphics.Keyboard

Getting real-time keyboard information

This module allows real-time access to the keyboard, to check if a key is currently pressed for example.

Polling keyboard

val is_pressed : OgamlCore.Keycode.t -> bool
is_pressed key will return true iff key is currently pressed
See : OgamlCore.Keycode

Accessing modifiers information

val is_shift_down : unit -> bool
true iff the shift modifier is active
val is_ctrl_down : unit -> bool
true iff the control modifier (or cmd on OSX) is active
val is_alt_down : unit -> bool
true iff the alt modifier is active