CUGL 2.0
Cornell University Game Library
Public Member Functions | Public Attributes | List of all members
cugl::KeyEvent Class Reference

#include <CUKeyboard.h>

Public Member Functions

 KeyEvent ()
 
 KeyEvent (KeyCode code, const Timestamp &stamp)
 
KeyCategory keyCategory ()
 

Public Attributes

Timestamp timestamp
 
KeyCode keycode
 

Detailed Description

This simple class is a struct to hold key event information

Constructor & Destructor Documentation

◆ KeyEvent() [1/2]

cugl::KeyEvent::KeyEvent ( )
inline

Constructs a new key event with the default values

◆ KeyEvent() [2/2]

cugl::KeyEvent::KeyEvent ( KeyCode  code,
const Timestamp stamp 
)
inline

Constructs a new key event with the given values

Parameters
codeThe code for the key pressed/released
stampThe timestamp for the event

Member Function Documentation

◆ keyCategory()

KeyCategory cugl::KeyEvent::keyCategory ( )

Returns the category of this event

See KeyCategory for information on categories.

Returns
the category of this event

Member Data Documentation

◆ keycode

KeyCode cugl::KeyEvent::keycode

The code for the key

◆ timestamp

Timestamp cugl::KeyEvent::timestamp

The time that the key was pressed/released


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