Pepper_47_C_interfaces
Public Attributes | List of all members
PP_InputEvent_Character Struct Reference

#include <pp_input_event.h>

Collaboration diagram for PP_InputEvent_Character:
Collaboration graph

Public Attributes

uint32_t modifier
 
char 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.

Definition at line 75 of file pp_input_event.h.

Member Data Documentation

uint32_t PP_InputEvent_Character::modifier

A combination of the PP_InputEvent_Modifier flags.

Definition at line 77 of file pp_input_event.h.

char PP_InputEvent_Character::text[5]

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.

Definition at line 84 of file pp_input_event.h.


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