ofDocsdocumentation events ofKeyEventArgs

ofKeyEventArgs

This class is integrated into the openframeworks events system. When a key event (key pressed, key released) happens we record key information inside an object of the class. Used to send event messages. In the new openFrameworks release we can find a very illustrative example about how to use events in openFrameworks.


hasModifier( ... )

bool hasModifier(int modifier)

ofKeyEventArgs( )

ofKeyEventArgs()

ofKeyEventArgs( ... )

ofKeyEventArgs(ofKeyEventArgs::Type type, int key)

ofKeyEventArgs( ... )

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

Variables

unsignedint codepointThe 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 isRepeatIf this is a repeat event
int keyFor 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).
int keycodeThe 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.
int modifiersKey modifiers
int scancodeThe raw scan code returned by the keyboard, OS and hardware specific.
enumofKeyEventArgs::Type type