[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 5/7] add the QKeyCode enum and the key_defs t
From: |
Amos Kong |
Subject: |
Re: [Qemu-devel] [PATCH v6 5/7] add the QKeyCode enum and the key_defs table |
Date: |
Mon, 13 Aug 2012 16:50:05 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
On 08/03/2012 09:32 PM, Luiz Capitulino wrote:
> On Fri, 3 Aug 2012 10:48:40 +0800
> Amos Kong <address@hidden> wrote:
>
>> key_defs[] in monitor.c is a mapping table of keys and keycodes,
>> this patch added a QKeyCode enum and a new key_defs table,
>> Key's index in the enmu is same as keycode's index in new key_defs[].
>>
>> Signed-off-by: Amos Kong <address@hidden>
>> ---
>> input.c | 146
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> qapi-schema.json | 26 ++++++++++
>> 2 files changed, 172 insertions(+), 0 deletions(-)
>>
>> diff --git a/input.c b/input.c
>> index 6968b31..680d756 100644
>> --- a/input.c
>> +++ b/input.c
>> @@ -37,6 +37,152 @@ static QTAILQ_HEAD(, QEMUPutMouseEntry) mouse_handlers =
>> static NotifierList mouse_mode_notifiers =
>> NOTIFIER_LIST_INITIALIZER(mouse_mode_notifiers);
>>
>> +static const int key_defs[] = {
>
> Weird, I expected this would brake the build, as the new table is unused.
>
> Anyway, what I suggested in my last review was to do the table move in a
> different patch, which includes adding the new accessors, dropping key_defs
> from the monitor and doing the necessary changes in the monitor functions
> which access key_defs directly.
>
> This way, the patch converting sendkey() to the qapi does just the
> conversion itself (vs. conversion plus refactorings).
Ok. I would split convert patch to two patches, and do the refactorings
in first patch.
Thanks, Amos
- [Qemu-devel] [PATCH v6 0/7] convert sendkey to qapi, Amos Kong, 2012/08/02
- [Qemu-devel] [PATCH v6 1/7] fix doc of using raw values with sendkey, Amos Kong, 2012/08/02
- [Qemu-devel] [PATCH v6 2/7] monitor: rename keyname '<' to 'less', Amos Kong, 2012/08/02
- [Qemu-devel] [PATCH v6 3/7] hmp: rename arguments, Amos Kong, 2012/08/02
- [Qemu-devel] [PATCH v6 4/7] qapi: generate list struct and visit_list for enum, Amos Kong, 2012/08/02
- [Qemu-devel] [PATCH v6 5/7] add the QKeyCode enum and the key_defs table, Amos Kong, 2012/08/02
- [Qemu-devel] [PATCH v6 6/7] add functions to convert key/code to index of mapping table, Amos Kong, 2012/08/02
- [Qemu-devel] [PATCH v6 7/7] qapi: convert sendkey, Amos Kong, 2012/08/02