Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-27 Thread Luiz Capitulino
On Thu, 27 Sep 2012 13:42:57 +0200 Markus Armbruster wrote: > Luiz Capitulino writes: > > > Before the qapi conversion, the sendkey command could be used to > > send key codes in hex directly to the guest. In HMP, this would > > be like: > > > > (qemu) sendkey 0xdc > > > > However, the qapi co

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-27 Thread Markus Armbruster
Luiz Capitulino writes: > Before the qapi conversion, the sendkey command could be used to > send key codes in hex directly to the guest. In HMP, this would > be like: > > (qemu) sendkey 0xdc > > However, the qapi conversion broke this, as it only supports sending > QKeyCode values to the guest.

[Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-26 Thread Luiz Capitulino
Before the qapi conversion, the sendkey command could be used to send key codes in hex directly to the guest. In HMP, this would be like: (qemu) sendkey 0xdc However, the qapi conversion broke this, as it only supports sending QKeyCode values to the guest. That's a regression. This commit fixes

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-23 Thread Avi Kivity
On 09/21/2012 09:20 PM, Eric Blake wrote: > On 09/21/2012 12:18 PM, Eric Blake wrote: > >> Any better ideas? > > > > Maybe s/hex/number/, as in: > > > > JSON: 'number':0x20 > > > > C code: keylist->value->number = number; > > > > that is, you are passing the value either as a keycode name, or a

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-21 Thread Eric Blake
On 09/21/2012 12:18 PM, Eric Blake wrote: >> Any better ideas? > > Maybe s/hex/number/, as in: > > JSON: 'number':0x20 > > C code: keylist->value->number = number; > > that is, you are passing the value either as a keycode name, or as a number. Or even s/hex/int/ except that the C code would

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-21 Thread Markus Armbruster
Luiz Capitulino writes: > On Fri, 21 Sep 2012 13:42:34 -0300 > Luiz Capitulino wrote: > >> On Fri, 21 Sep 2012 10:31:23 -0600 >> Eric Blake wrote: >> >> > On 09/21/2012 08:55 AM, Luiz Capitulino wrote: >> > > This commit fixes the problem by adding hex value support down >> > > the QMP interfa

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-21 Thread Eric Blake
On 09/21/2012 11:26 AM, Luiz Capitulino wrote: > On Fri, 21 Sep 2012 13:42:34 -0300 > Luiz Capitulino wrote: > +{ 'union': 'KeyValue', + 'data': { +'hex': 'int', +'qcode': 'QKeyCode', >>> >>> Don't you find it a bit odd to name this 'hex', even though it works to >>>

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-21 Thread Luiz Capitulino
On Fri, 21 Sep 2012 13:42:34 -0300 Luiz Capitulino wrote: > On Fri, 21 Sep 2012 10:31:23 -0600 > Eric Blake wrote: > > > On 09/21/2012 08:55 AM, Luiz Capitulino wrote: > > > This commit fixes the problem by adding hex value support down > > > the QMP interface, qmp_send_key(). > > > > > > > >

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-21 Thread Luiz Capitulino
On Fri, 21 Sep 2012 10:31:23 -0600 Eric Blake wrote: > On 09/21/2012 08:55 AM, Luiz Capitulino wrote: > > This commit fixes the problem by adding hex value support down > > the QMP interface, qmp_send_key(). > > > > > +++ b/qapi-schema.json > > @@ -2588,12 +2588,25 @@ > > 'lf', 'h

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-21 Thread Eric Blake
On 09/21/2012 08:55 AM, Luiz Capitulino wrote: > This commit fixes the problem by adding hex value support down > the QMP interface, qmp_send_key(). > > +++ b/qapi-schema.json > @@ -2588,12 +2588,25 @@ > 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] } > > ## > +# @KeyValue > +# >

[Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-21 Thread Luiz Capitulino
Before the qapi conversion, the sendkey command could be used to send key codes in hex directly to the guest. In HMP, this would be like: (qemu) sendkey 0xdc However, the qapi conversion broke this, as it will only send to the guest QKeyCode values. That's a regression. This commit fixes the pr

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-20 Thread Eric Blake
On 09/20/2012 12:18 PM, Luiz Capitulino wrote: > Before the qapi conversion, the sendkey command could be used to > send key codes in hex directly to the guest. This doesn't work > with the current implemention, as it will only send to the guest > QKeyCode values. That's a regression. > > This com

[Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-20 Thread Luiz Capitulino
Before the qapi conversion, the sendkey command could be used to send key codes in hex directly to the guest. This doesn't work with the current implemention, as it will only send to the guest QKeyCode values. That's a regression. This commit fixes the problem by adding hex value support down the