Public Member Functions

glv::Keyboard Class Reference

Holds keyboard state. More...

#include <glv_core.h>

List of all members.

Public Member Functions

 Keyboard ()
 Constructor.
int key () const
 Returns ASCII key code of last key event.
int keyAsNumber () const
 Returns decimal number correlating to key code.
bool alt () const
 Whether an alt key is down.
bool caps () const
 Whether capslock is down.
bool ctrl () const
 Whether a ctrl key is down.
bool meta () const
 Whether a meta (e.g. windows, apple) key is down.
bool shift () const
 Whether a shift key is down.
bool isDown () const
 Whether last event was button down.
bool isNumber () const
 Whether key is a number key.
bool key (int k) const
 Whether the last key was 'k'.
void alt (bool v)
 Set alt key state.
void caps (bool v)
 Set alt key state.
void ctrl (bool v)
 Set ctrl key state.
void meta (bool v)
 Set meta key state.
void shift (bool v)
 Set shift key state.
void print ()
 Print keyboard state to stdout.

Detailed Description

Holds keyboard state.


The documentation for this class was generated from the following files: