Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-15 Thread Peter Maydell
On 15 March 2016 at 15:24, Programmingkid wrote: > I did several tests and found out that the USB keyboard actually > works a lot better than the ADB keyboard. Would you accept a patch > that changes the default keyboard and mouse to USB for the Mac99 > target? Not my call, ask the PPC maintainer

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-15 Thread Programmingkid
On Mar 15, 2016, at 5:22 AM, Peter Maydell wrote: > On 14 March 2016 at 23:06, Programmingkid wrote: >> On Mar 13, 2016, at 11:40 AM, Peter Maydell wrote: >>> Also, you need to handle the power-key key-release >>> scancode; as far as I can tell (by looking for info via >>> google about the ADB p

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-15 Thread Peter Maydell
On 14 March 2016 at 23:06, Programmingkid wrote: > On Mar 13, 2016, at 11:40 AM, Peter Maydell wrote: >> Also, you need to handle the power-key key-release >> scancode; as far as I can tell (by looking for info via >> google about the ADB protocol) power-key-down is >> 0x7f 0x7f, and power-key-up

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-14 Thread M A
On Mar 14, 2016, at 7:06 PM, Programmingkid wrote: > > On Mar 13, 2016, at 11:40 AM, Peter Maydell wrote: > >> On 12 March 2016 at 05:40, Programmingkid wrote: >>> >>> On Mar 11, 2016, at 10:30 PM, Peter Maydell wrote: >>> > +} > +keycode = s->data[s->rptr]; > +

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-14 Thread Programmingkid
On Mar 13, 2016, at 11:40 AM, Peter Maydell wrote: > On 12 March 2016 at 05:40, Programmingkid wrote: >> >> On Mar 11, 2016, at 10:30 PM, Peter Maydell wrote: >> >>> +} +keycode = s->data[s->rptr]; +if (++s->rptr == sizeof(s->data)) { +s->rptr = 0;

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-13 Thread Peter Maydell
On 13 March 2016 at 16:39, Programmingkid wrote: > I did try this but a bunch of errors showed up. > /include/migration/vmstate.h:248:48: error: invalid operands to binary - > (have 'uint8_t (*)[256]' and 'uint16_t (*)[128]') > #define type_check_array(t1,t2,n) ((t1(*)[n])0 - (t2*)0) > > /inclu

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-13 Thread Programmingkid
On Mar 13, 2016, at 11:40 AM, Peter Maydell wrote: > On 12 March 2016 at 05:40, Programmingkid wrote: >> >> On Mar 11, 2016, at 10:30 PM, Peter Maydell wrote: >> >>> +} +keycode = s->data[s->rptr]; +if (++s->rptr == sizeof(s->data)) { +s->rptr = 0;

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-13 Thread Peter Maydell
On 12 March 2016 at 04:27, Programmingkid wrote: > > On Mar 11, 2016, at 10:30 PM, Peter Maydell wrote: > >> On 11 March 2016 at 09:32, Programmingkid wrote: >>> Remove the old pc_to_adb_keycode array and replace it with QKeyCode support. >>> >>> Signed-off-by: John Arbuckle >>> --- >>> Some of

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-13 Thread Peter Maydell
On 12 March 2016 at 05:40, Programmingkid wrote: > > On Mar 11, 2016, at 10:30 PM, Peter Maydell wrote: > >> >>> +} >>> +keycode = s->data[s->rptr]; >>> +if (++s->rptr == sizeof(s->data)) { >>> +s->rptr = 0; >>> } >>> +s->count--; >>> + >>> +obuf[0] = keycode; >> >>

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-11 Thread Programmingkid
On Mar 11, 2016, at 10:30 PM, Peter Maydell wrote: > >> +} >> +keycode = s->data[s->rptr]; >> +if (++s->rptr == sizeof(s->data)) { >> +s->rptr = 0; >> } >> +s->count--; >> + >> +obuf[0] = keycode; > > You are still trying to put a two byte keycode (ADB_KEY_POWER)

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-11 Thread Programmingkid
On Mar 11, 2016, at 10:30 PM, Peter Maydell wrote: > On 11 March 2016 at 09:32, Programmingkid wrote: >> Remove the old pc_to_adb_keycode array and replace it with QKeyCode support. >> >> Signed-off-by: John Arbuckle >> --- >> Some of the keys do not translate as logically as we would think th

Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-11 Thread Peter Maydell
On 11 March 2016 at 09:32, Programmingkid wrote: > Remove the old pc_to_adb_keycode array and replace it with QKeyCode support. > > Signed-off-by: John Arbuckle > --- > Some of the keys do not translate as logically as we would think they would. > For > example the Q_KEY_CODE_CTRL_R does not wor

[Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support

2016-03-10 Thread Programmingkid
Remove the old pc_to_adb_keycode array and replace it with QKeyCode support. Signed-off-by: John Arbuckle --- Some of the keys do not translate as logically as we would think they would. For example the Q_KEY_CODE_CTRL_R does not work with ADB_KEY_RIGHT_CONTROL. The wrong key would show up in the