Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please re-add SDL_EnableKeyRepeat(), and make sure it works on text input events #3239

Open
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Milestone

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2019-04-13 21:04:20 +0000, Ellie wrote:

Please re-add SDL_EnableKeyRepeat(), and make sure it works on text input events. The problem is that with SDL_TEXTINPUT, one key stroke might cause multiple characters, or a key stroke might cause zero text characters, so doing this manually without breaking a corner case is pretty challenging without detailed internals knowledge of SDL2.

Why am I asking for this? On Android bluetooth keyboards can be unreliable not only in terms of lag, but also keys becoming "stuck" for half a second. Key repeat is seldomly REALLY needed even when typing text (as opposed to games where it's even less needed), so I want to provide a simple option to disable it. However, I find myself unable to do so because SDL_EnableKeyRepeat() was ripped out in SDL 2 and never reintroduced, and all the internet help text suggest hacking around key up/down events with manual tracking (which in itself is ugly) and which doesn't help me with the text input side of things.

I agree this is quite a niche use case but I'd say for getting accessibility right for all cases for less gamey apps, this option isn't that unimportant

On 2019-04-13 21:08:48 +0000, Ellie wrote:

As for backspace and arrow keys, it wouldn't be entirely useless to be able to leave key repeat for them on since that's the only keys where people really expect it. (and which are also used comparatively rarely enough that an unintended repeat isn't as disruptive - still is, but not as bad) But the option would still be useful to me without this, since I'd consider it easier to reintroduce manual repeat for these keys than to reliably filter it out of text editing events myself for all corner cases

On 2019-06-12 02:59:34 +0000, Sam Lantinga wrote:

We'll look at this post-2.0.10. Thanks!

@slouken slouken removed the bug label May 11, 2022
@slouken slouken added this to the 3.2.0 milestone Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants