DISTRHO Plugin Framework
Public Member Functions | Public Attributes | List of all members
Widget::KeyboardEvent Struct Reference

#include <Widget.hpp>

Inheritance diagram for Widget::KeyboardEvent:
Widget::BaseEvent

Public Member Functions

 KeyboardEvent () noexcept
 
- Public Member Functions inherited from Widget::BaseEvent
 BaseEvent () noexcept
 
virtual ~BaseEvent () noexcept
 

Public Attributes

bool press
 
uint key
 
uint keycode
 
- Public Attributes inherited from Widget::BaseEvent
uint mod
 
uint flags
 
uint time
 

Detailed Description

Keyboard event.

This event represents low-level key presses and releases. This can be used for "direct" keyboard handing like key bindings, but must not be interpreted as text input.

Keys are represented portably as Unicode code points, using the "natural" code point for the key. The key field is the code for the pressed key, without any modifiers applied. For example, a press or release of the 'A' key will have key 97 ('a') regardless of whether shift or control are being held.

Alternatively, the raw keycode can be used to work directly with physical keys, but note that this value is not portable and differs between platforms and hardware.

See also
onKeyboard

Constructor & Destructor Documentation

◆ KeyboardEvent()

Widget::KeyboardEvent::KeyboardEvent ( )
inlinenoexcept

Constructor for default/null values

Member Data Documentation

◆ press

bool Widget::KeyboardEvent::press

True if the key was pressed, false if released.

◆ key

uint Widget::KeyboardEvent::key

Unicode point of the key pressed.

◆ keycode

uint Widget::KeyboardEvent::keycode

Raw keycode.


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