From: Liming Wang <walimisdev@gmail.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Sasha Levin <levinsasha928@gmail.com>,
Ingo Molnar <mingo@elte.hu>, Asias He <asias.hejun@gmail.com>,
<kvm@vger.kernel.org>
Subject: [PATCH 3/3] kvm tools: enable keyboard press repeat for sdl
Date: Thu, 11 Aug 2011 13:07:47 +0800 [thread overview]
Message-ID: <1313039267-25951-3-git-send-email-walimisdev@gmail.com> (raw)
In-Reply-To: <1313039267-25951-1-git-send-email-walimisdev@gmail.com>
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
next prev parent reply other threads:[~2011-08-11 5:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 5:07 [PATCH 1/3] kvm tools: add signal placeholder to avoid balloon crash Liming Wang
2011-08-11 5:07 ` [PATCH 2/3] kvm tools: check negative value of num_pages Liming Wang
2011-08-11 5:37 ` Sasha Levin
2011-08-11 5:40 ` walimis
2011-08-11 7:22 ` Sasha Levin
2011-08-11 7:21 ` Liming Wang
2011-08-11 13:36 ` Pekka Enberg
2011-08-11 13:37 ` walimis
2011-08-11 5:07 ` Liming Wang [this message]
2011-08-11 7:29 ` [PATCH 1/3] kvm tools: add signal placeholder to avoid balloon crash Sasha Levin
2011-08-11 7:21 ` walimis
2011-08-11 7:28 ` [PATCH 1/3] kvm tools: ignore balloon signals by default " Liming Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313039267-25951-3-git-send-email-walimisdev@gmail.com \
--to=walimisdev@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox