]> git.proxmox.com Git - qemu.git/commit - monitor.c
Enhance sendkey with key hold time (Jan Kiszka).
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 8 Jun 2008 22:45:01 +0000 (22:45 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 8 Jun 2008 22:45:01 +0000 (22:45 +0000)
commitc8256f9d23bba4fac3b0b6a9e6e3dc12362cbe0b
tree5d698284ac48ee79c1ac0da2552d4e2af7fd08bb
parent7dd9e556e396a6c12a1d31e53ba98a2a90c4e73d
Enhance sendkey with key hold time (Jan Kiszka).

Current key injection via the monitor basically generates no key hold
time. This is fine for keyboard emulations that have their own queues,
but it causes troubles for those how don't (like the MusicPal - it
simply does not work with injected keys). Moreover, I would like to use
this mechanism to simulate pressed buttons during power-up.

Therefore, this patch enhances the key injection with a configurable
release delay (by default 100 virtual milliseconds).

This feature allows to get rid of the initial sleep() in musicpal_init
because one can now simply start qemu with -S and issue "sendkey m 1000"
and "continue" in the monitor to achieve the desired effect of a pressed
menu button during power-up. So there is no need for a per-musicpal or
even qemu-wide "-hold-button" switch.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4701 c046a42c-6fe2-441c-8c8c-71466251a162
hw/musicpal.c
monitor.c