reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

#include <ofEvents.h>

Inheritance diagram for ofKeyEventArgs:
ofEventArgs

Public Types

enum  Type { Pressed , Released }
 

Public Member Functions

 ofKeyEventArgs ()
 
 ofKeyEventArgs (Type type, int key, int keycode, int scancode, unsigned int codepoint, int modifiers)
 
 ofKeyEventArgs (Type type, int key)
 
bool hasModifier (int modifier) const
 

Public Attributes

Type type
 
int key
 For special keys, one of OF_KEY_* (.
 
int keycode
 The keycode returned by the windowing system, independent of any modifier keys or keyboard layout settings. For ofAppGLFWWindow this value is one of GLFW_KEY_* (.
 
int scancode
 The raw scan code returned by the keyboard, OS and hardware specific.
 
uint32_t codepoint
 The Unicode code point you'd expect if this key combo (including modifier keys) was pressed in a text editor, or 0 for non-printable characters.
 
bool isRepeat
 If this is a repeat event.
 
int modifiers = 0
 Key modifiers.
 

Member Enumeration Documentation

◆ Type

Enumerator
Pressed 
Released 

Constructor & Destructor Documentation

◆ ofKeyEventArgs() [1/3]

ofKeyEventArgs::ofKeyEventArgs ( )
inline

◆ ofKeyEventArgs() [2/3]

ofKeyEventArgs::ofKeyEventArgs ( Type  type,
int  key,
int  keycode,
int  scancode,
unsigned int  codepoint,
int  modifiers 
)
inline

◆ ofKeyEventArgs() [3/3]

ofKeyEventArgs::ofKeyEventArgs ( Type  type,
int  key 
)
inline

Member Function Documentation

◆ hasModifier()

bool ofKeyEventArgs::hasModifier ( int  modifier) const
inline

Member Data Documentation

◆ codepoint

uint32_t ofKeyEventArgs::codepoint

The Unicode code point you'd expect if this key combo (including modifier keys) was pressed in a text editor, or 0 for non-printable characters.

◆ isRepeat

bool ofKeyEventArgs::isRepeat

If this is a repeat event.

◆ key

int ofKeyEventArgs::key

For special keys, one of OF_KEY_* (.

See also
ofConstants.h). For all other keys, the Unicode code point you'd expect if this key combo (including modifier keys that may be down) was pressed in a text editor (same as codepoint).

◆ keycode

int ofKeyEventArgs::keycode

The keycode returned by the windowing system, independent of any modifier keys or keyboard layout settings. For ofAppGLFWWindow this value is one of GLFW_KEY_* (.

See also
glfw3.h) - typically, ASCII representation of the symbol on the physical key, so A key always returns 0x41 even if shift, alt, ctrl are down.

◆ modifiers

int ofKeyEventArgs::modifiers = 0

Key modifiers.

◆ scancode

int ofKeyEventArgs::scancode

The raw scan code returned by the keyboard, OS and hardware specific.

◆ type

Type ofKeyEventArgs::type

The documentation for this class was generated from the following file:
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/events/ofEvents.h