You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.1 Reported for operating system, platform: Windows (All), x86_64
Comments on the original bug report:
On 2016-05-11 07:00:20 +0000, Eric Wasylishen wrote:
Created attachment 2451
patch to test program to demonstrate the bug
The bug here is that a dead keys pressed before calling SDL_StartTextInput() carries over into future text input, so the next key pressed will have the deadkey applied to it.
This in undesirable, imho, and doesn't occur on OS X (haven't check Linux or elsewhere). It's causing a problem for Quakespasm on German keyboard layouts, where we use the ^ deadkey to toggle the console (which enables/disables text input), and ^ characters are showing up in the TEXTINPUT events.
Attaching a patch. Unfortunately there's no clean API to reset the dead key state, the only way appears to be using ToUnicode.
Also attached a patch to the checkkeys sample so you can reproduce this; it makes clicking the mouse toggle SDL_StartTextInput() and SDL_StopTextInput().
Steps to reproduce with the patched 'checkkeys':
switch to a keyboard layout with deadkeys, e.g. German
launch "checkkeys", click the mouse to disable text input
press the a deadkey, e.g. ^ below Escape on the German layout
click the mouse again to cause a SDL_StartTextInput() call
press "a" key.
expected: the TEXTINPUT event in the log should just be a regular "a"
observed: the "a" has an accent
On 2016-05-11 07:02:02 +0000, Eric Wasylishen wrote:
Created attachment 2452
proposed fix
On 2016-05-24 21:39:18 +0000, Eric Wasylishen wrote:
Created attachment 2462
patch for SDL 1.2
On 2016-05-25 22:32:27 +0000, Eric Wasylishen wrote:
Created attachment 2463
Updated sdl2 patch
Updated SDL2 patch from Ozkan:
-make C89
-call WIN_ResetDeadKeys() from SDL_KeyboardQuit so dead keys pressed just before exiting don't carry over to other applications
On 2016-05-25 22:33:28 +0000, Eric Wasylishen wrote:
Created attachment 2464
Updated sdl1.2 patch
Updated SDL1.2 patch from Ozkan, same changes as for SDL2
On 2016-10-01 19:19:08 +0000, Sam Lantinga wrote:
Fixed, thanks!
I used a slightly different way of resetting dead keys on exit that also covers alt-tab away from the SDL window.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
proposed fix (resetdead.diff, text/plain, 2016-05-11 07:02:02 +0000, 1451 bytes)patch for SDL 1.2 (deadkeys-sdl12.diff, text/plain, 2016-05-24 21:39:18 +0000, 1837 bytes)Reported in version: HG 2.1
Reported for operating system, platform: Windows (All), x86_64
Comments on the original bug report:
On 2016-05-11 07:00:20 +0000, Eric Wasylishen wrote:
On 2016-05-11 07:02:02 +0000, Eric Wasylishen wrote:
On 2016-05-24 21:39:18 +0000, Eric Wasylishen wrote:
On 2016-05-25 22:32:27 +0000, Eric Wasylishen wrote:
On 2016-05-25 22:33:28 +0000, Eric Wasylishen wrote:
On 2016-10-01 19:19:08 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: