Data Fields

uint32_t modifier
int8_t text [5]

Detailed Description

The PP_InputEvent_Character struct represents a typed character event.

Normally, the program will receive a key down event, followed by a character event, followed by a key up event. The character event will have any modifier keys applied. Obvious examples are symbols, where Shift-5 gives you a ''. The key down and up events will give you the scan code for the "5" key, and the character event will give you the '' character.

You may not get a character event for all key down events if the key doesn't generate a character. Likewise, you may actually get multiple character events in a row. For example, some locales have an accent key that modifies the next character typed. You might get this stream of events: accent down, accent up (it didn't generate a character), letter key down, letter with accent character event (it was modified by the previous accent key), letter key up. If the letter can't be combined with the accent, like an umlaut and an 'R', the system might send umlaut down, umlaut up, 'R' key down, umlaut character (can't combine it with 'R', so just send the raw umlaut so it isn't lost"), 'R' character event, 'R' key up.


Field Documentation

A combination of the PP_InputEvent_Modifier flags.

This value represents the typed character as a single null-terminated UTF-8 character.

Any unused bytes will be filled with null bytes. Since the maximum UTF-8 character is 4 bytes, there will always be at least one null at the end so you can treat this as a null-terminated UTF-8 string.


The documentation for this struct was generated from the following file:
This site uses cookies to deliver and enhance the quality of its services and to analyze traffic. If you agree, cookies are also used to serve advertising and to personalize the content and advertisements that you see. Learn more about our use of cookies.