Clarify keyboard callback.

This commit is contained in:
Themaister 2013-12-09 14:28:05 +01:00
parent 1135f42dd7
commit df85b754b8

View File

@ -750,10 +750,13 @@ struct retro_hw_render_callback
// keycode is the RETROK value of the char. // keycode is the RETROK value of the char.
// character is the text character of the pressed key. (UTF-32). // character is the text character of the pressed key. (UTF-32).
// key_modifiers is a set of RETROKMOD values or'ed together. // key_modifiers is a set of RETROKMOD values or'ed together.
//
// The pressed/keycode state can be indepedent of the character. // The pressed/keycode state can be indepedent of the character.
// It is also possible that multiple characters are generated from a single keypress. // It is also possible that multiple characters are generated from a single keypress.
// The events should be treated separately, however, when possible, the frontend should // Keycode events should be treated separately from character events.
// try to synchronize these. // However, when possible, the frontend should try to synchronize these.
// If only a character is posted, keycode should be RETROK_UNKNOWN.
// Similarily if only a keycode event is generated with no corresponding character, character should be 0.
typedef void (*retro_keyboard_event_t)(bool down, unsigned keycode, uint32_t character, uint16_t key_modifiers); typedef void (*retro_keyboard_event_t)(bool down, unsigned keycode, uint32_t character, uint16_t key_modifiers);
struct retro_keyboard_callback struct retro_keyboard_callback