diff mbox

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

Message ID 1313039267-25951-3-git-send-email-walimisdev@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

walimis Aug. 11, 2011, 5:07 a.m. UTC
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 mbox

Patch

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);