[PATCH 3/3] kvm tools: enable keyboard press repeat for sdl

Liming Wang
2011-08-11T05:24:02Z

Set keyboard repeat rate to enable keyboard press repeat.

It means that don't repeat the key value every 50 milliseconds
until 200 milliseconds later when the key is pressed.

Signed-off-by: Liming Wang <walimisdev@gmail.com>
---
tools/kvm/ui/sdl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/ui/sdl.c b/tools/kvm/ui/sdl.c
index 088cd29..6320ce7 100644
--- a/tools/kvm/ui/sdl.c
+++ b/tools/kvm/ui/sdl.c
@@ -99,6 +99,8 @@ static void *sdl__thread(void *p)
if (!screen)
die("Unable to set SDL video mode");

+ SDL_EnableKeyRepeat(200, 50);
+
for (;;) {
SDL_BlitSurface(guest_screen, NULL, screen, NULL);
SDL_Flip(screen);
--
1.7.0.4