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 - Text Input is active by default
Summary: Text Input is active by default
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.8
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-11 20:22 UTC by Bram Stolk
Modified: 2018-10-17 19:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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();
    }
---