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 4166

Summary: Text Input is active by default
Product: SDL Reporter: Bram Stolk <b.stolk>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: linus.probert
Version: 2.0.8   
Hardware: x86_64   
OS: Linux   

Description Bram Stolk 2018-05-11 20:22:25 UTC
Text Input is active by default.
This is not mentioned in the Wiki documentation.

Text Input causes 2ms spikes for each key-press.

Write up here:
http://thelittleengineerthatcould.blogspot.ca/2018/05/the-curious-case-of-fps-jitter.html

At the very least, documentation should be fixed to mention this.

Or better, Text Input mode should not be active by default.

Ubuntu 18.04
SDL 2.0.8
Comment 1 Linus Probert 2018-10-17 19:55:34 UTC
Nice post. I was not aware of this but I've been wondering over the "jitter" you mentioned which I'm quite sure I've been affected by.

Not my place to say, but the offending line is in SDL_video.c:568 (current code).

The comment above suggests that this is intended so perhaps the documentation should be updated:

---
    /* If we don't use a screen keyboard, turn on text input by default,
       otherwise programs that expect to get text events without enabling
       UNICODE input won't get any events.

       Actually, come to think of it, you needed to call SDL_EnableUNICODE(1)
       in SDL 1.2 before you got text input events.  Hmm...
     */
    if (!SDL_HasScreenKeyboardSupport()) {
        SDL_StartTextInput();
    }
---