SDL_EnableKeyRepeat(3)
π SDL_EnableKeyRepeat π
okay bestie, welcome to the SDL API Reference β this one's SDL_EnableKeyRepeat(3) and it's literally about making your keyboard go brrrrr when you hold a key down. πΉβ¨
β¨ NAME β¨
SDL_EnableKeyRepeat β set the keyboard repeat rate, periodt. π
π¦ SYNOPSIS π¦
#include "SDL.h"
int SDL_EnableKeyRepeat(int delay, int interval);
πΈ DESCRIPTION πΈ
So what this does is it enables or disables the keyboard repeat rate. Groundbreaking, i know. π
Here's the tea tho:
delayis how long the key has to be pressed before it starts repeating. it's giving "how long do i gotta hold this before you notice me" energy. π- after that lil wait is up, it repeats at the speed set by
interval.
Both delay and interval are in milliseconds, bestie. don't forget. fr fr. β±οΈ
And here's the important bit: if you set delay to 0, key repeating gets disabled completely. like, gone. no repeats. nada. π
Wanna know the good default values? They're SDL_DEFAULT_REPEAT_DELAY and SDL_DEFAULT_REPEAT_INTERVAL. slay. use those if you don't wanna think about it. π
π RETURN VALUE π
- Returns
0on success π«Ά - Returns
-1on failure π
that's it. that's the whole vibe check.
and that's a wrap on the SDL API Reference, gorgeous. this page came from SDL, dated Tue 11 Sep 2001, 22:59 β yes, the date is doing vintage main character energy, we respect it. go forth and repeat responsibly. πβ¨π
π¦ where this page comes from
- debian bookworm: libsdl1.2-dev 1.2.15+dfsg2-8 Β· LGPL-2.1-or-later
- nixos 26.05: SDL_sixel 0-unstable-2016-02-06
- nixpkgs unstable: SDL_sixel 0-unstable-2016-02-06
- ubuntu jammy: libsdl1.2-dev 1.2.15+dfsg2-6 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms