mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
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
This commit is contained in:
parent
7dd9e556e3
commit
c8256f9d23
2 changed files with 39 additions and 25 deletions
|
@ -1504,12 +1504,6 @@ static void musicpal_init(ram_addr_t ram_size, int vga_ram_size,
|
|||
|
||||
qemu_add_kbd_event_handler(musicpal_key_event, pic[MP_GPIO_IRQ]);
|
||||
|
||||
/*
|
||||
* Wait a bit to catch menu button during U-Boot start-up
|
||||
* (to trigger emergency update).
|
||||
*/
|
||||
sleep(1);
|
||||
|
||||
mv88w8618_eth_init(&nd_table[0], MP_ETH_BASE, pic[MP_ETH_IRQ]);
|
||||
|
||||
mixer_i2c = musicpal_audio_init(MP_AUDIO_BASE, pic[MP_AUDIO_IRQ]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue