|
From: | Amos Kong |
Subject: | Re: [Qemu-devel] [PATCH v2 1/6] qerror: add MAX_KEYCODES 16 |
Date: | Fri, 15 Jun 2012 15:46:31 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 |
On 14/06/12 18:20, Amos Kong wrote:
On 12/06/12 01:25, Luiz Capitulino wrote:Hi Luiz, AnthonyBTW, why is there a 16 keycode limit?'Sendkey' command was added by this commit a3a91a355bc6107b7d06d722fb97d2b80065ee0b Limitation of keycodes number (16) was also introduced here, and I didn't find the root reason.That's a good point. This comes form the array used by the original implementation to store the keycodes. Amos, is it still needed now that we're using qapi lists?I try to drop this limitation from monitor.c [1], then execute (qemu) sendkey 1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7-8-9-0 kbd_put_keycode() are called for all (20) keycodes, but only '123456789012345' can be sent to guest. It seems we need to notice user when inputted keys are more than 16.
Hi Gerd, When I use 'sendkey' command to send key-series to guest, some keyboard events will be send. There is a limitation (16) that was introduced by this old commit c8256f9d (without description). Do you know the reason? I found in bonzini's commit 13f8b97a : +#define QUEUE_LENGTH 16 /* should be enough for a triple-click */ bonzini told me that the reason to do it for the keyboard, was to do ctrl-alt-delete, nothing more I drop this limitation (16) in monitor.c for sendkey command, when I execute (qemu) sendkey 1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7-8-9-0 , hw/ps2.c:ps2_put_keycode() is called for all keys, but only '123456789012345' is inputted to guest. There is a 'PS2_QUEUE_SIZE' (256) in hw/ps2.c, this event queue is shared by mouse and keyboard, but I only inputted 20 keys. I didn't find where the other keys are ignored, and there is no warning in stderr. Hi Anthony, Luiz,However, the limitation (16) for sendkey is necessary, 16 is enough for all combination keys
[1] https://github.com/kongove/QEMU/commit/a198cdcce3ce4c1632221ac7f1e7c4e8efcd9c82
-- Amos.
[Prev in Thread] | Current Thread | [Next in Thread] |