Method SDL.enable_unicode()


Method enable_unicode

int enable_unicode(int enable)

Description

Enables/Disables UNICODE keyboard translation.

If you wish to translate a keysym to its printable representation, you need to enable UNICODE translation using this function and then look in the unicode member of the SDL.Keysym class. This value will be zero for keysyms that do not have a printable representation. UNICODE translation is disabled by default as the conversion can cause a slight overhead.

Parameter enable

A value of 1 enables Unicode translation, 0 disables it and -1 leaves it unchanged (useful for querying the current translation mode).

Returns

The previous translation mode (1 enabled, 0 disabled). If enable is -1, the return value is the current translation mode.

See also

SDL.Keysym