MCPcopy Create free account
hub / github.com/DISTRHO/DPF / CharacterInputEvent

Class CharacterInputEvent

dgl/Widget.hpp:137–155  ·  view source on GitHub ↗

Character input event. This event represents text input, usually as the result of a key press. The text is given both as a Unicode character code and a UTF-8 string. Note that this event is generated by the platform's input system, so there is not necessarily a direct correspondence between text events and physical key presses. For example, with some input methods a

Source from the content-addressed store, hash-verified

135 @see onCharacterInput
136 */
137 struct CharacterInputEvent : BaseEvent {
138 /** Raw key code. */
139 uint keycode;
140 /** Unicode character code. */
141 uint character;
142 /** UTF-8 string. */
143 char string[8];
144
145 /** Constructor for default/null values */
146 CharacterInputEvent() noexcept
147 : BaseEvent(),
148 keycode(0),
149 character(0),
150#ifdef DISTRHO_PROPER_CPP11_SUPPORT
151 string{'\0','\0','\0','\0','\0','\0','\0','\0'} {}
152#else
153 string() { std::memset(string, 0, sizeof(string)); }
154#endif
155 };
156
157 /**
158 Mouse press or release event.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected