We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2387

Summary: Text input events are reported inconstantly on key repeat
Product: SDL Reporter: Daniel Bünzli <daniel.buenzli>
Component: eventsAssignee: (disabled) Jørgen Tjernø <jorgen>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.1   
Hardware: x86   
OS: Mac OS X 10.8   
Attachments: Minimal test case showing the bug.

Description Daniel Bünzli 2014-02-06 23:18:01 UTC
Created attachment 1550 [details]
Minimal test case showing the bug.

If I hold a key for a long time on my keyboard I always expect the attached program to have interleaving "Down" and "Text" output. It sometimes work and sometimes it doesn't. The "Text" output (i.e. the TEXT_INPUT events) get lost. 

E.g. here a sample problematic output first I made a key repeat with key a that worked. Then a key repeat with key f but this one loses subsequent Text events:

> ./minc 
Down A
Text a
Down A
Text a
Down A
Text a
Down A
Text a
Down A
Text a
Down A
Text a
Down F
Text f
Down F
Down F
Down F
Down F
Down F
Down F
Down F
Down F
Down F
Comment 1 Sam Lantinga 2014-02-09 10:49:36 UTC
Hey Jorgen, any ideas?
Comment 2 (disabled) Jørgen Tjernø 2014-02-10 22:22:29 UTC
Off the top of my head, maybe this is triggering the long-press IME composer that was introduced in 10.7 or 10.8. I'll take a look later.
Comment 3 (disabled) Jørgen Tjernø 2014-02-25 00:32:20 UTC
Definitely seems related to IME - the multiple "text" events seem to only happens on keys that have the "long press" IME popup in other applications.
Comment 4 (disabled) Jørgen Tjernø 2014-02-25 00:49:35 UTC
https://hg.libsdl.org/SDL/rev/e671ec6b22dd
Comment 5 Daniel Bünzli 2014-02-25 16:35:39 UTC
The fix works. Thanks.