SDL: send correct key event unicode value for non-English physical keyboards
This commit is contained in:
@@ -201,7 +201,7 @@ extern void SDL_ANDROID_MainThreadPushKeyboardKey(int pressed, SDL_scancode key,
|
||||
|
||||
if( pressed == SDL_RELEASED )
|
||||
keysym.unicode = 0;
|
||||
else if( keysym.sym < 0x80 )
|
||||
else if( keysym.sym < 0x80 && keysym.unicode == 0 )
|
||||
keysym.unicode = keysym.sym;
|
||||
|
||||
//__android_log_print(ANDROID_LOG_INFO, "libSDL","SDL_SendKeyboardKey sym %d scancode %d unicode %d", keysym.sym, keysym.scancode, keysym.unicode);
|
||||
|
||||
@@ -998,7 +998,7 @@ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeKey) ( JNIEnv* env, jobject thiz, jint
|
||||
}
|
||||
|
||||
keycode = TranslateKeyGamepad(key, gamepadId);
|
||||
//__android_log_print(ANDROID_LOG_INFO, "libSDL","nativeKey %d action %d translated %d unicode %d", key, action, keycode, unicode);
|
||||
//__android_log_print(ANDROID_LOG_INFO, "libSDL","nativeKey %d action %d translated %d unicode %d unshifted %d", key, action, keycode, unicode, unshifted);
|
||||
|
||||
if( (int)keycode == SDLK_NO_REMAP || (keycode == SDLK_UNKNOWN && unicode == 0) )
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user