Support Unicode Keyboard Input

This commit is contained in:
Thomas Bernard
2018-02-15 14:46:44 +01:00
parent 689aebf264
commit 144d10b682
5 changed files with 13 additions and 5 deletions

View File

@@ -383,6 +383,9 @@ int Handle_key_press(SDL_KeyboardEvent event)
Key = Keysym_to_keycode(event.keysym);
Key_ANSI = Keysym_to_ANSI(event.keysym);
Key_UNICODE = event.keysym.unicode;
if (Key_UNICODE == 0)
Key_UNICODE = Key_ANSI;
switch(event.keysym.sym)
{
case SDLK_RSHIFT:
@@ -847,6 +850,7 @@ int Get_input(int sleep_time)
// some user input.
Flush_update();
Key_ANSI = 0;
Key_UNICODE = 0;
Key = 0;
Mouse_moved=0;
Input_new_mouse_X = Mouse_X;