Re: [Qemu-devel] [PATCH v7] ui/cocoa.m: Add ability for user to specify mouse ungrab key

2018-02-20 Thread Gerd Hoffmann
> >> case NSEventTypeKeyUp: > >> keycode = cocoa_keycode_to_qemu([event keyCode]); > >> > >> +if (are_sets_equal(ungrab_set, key_set)) { > >> +[self ungrabMouse]; > >> +clear_set(key_set); > >> +return; > >> +

Re: [Qemu-devel] [PATCH v7] ui/cocoa.m: Add ability for user to specify mouse ungrab key

2018-02-19 Thread Programmingkid
> On Feb 19, 2018, at 3:54 AM, Gerd Hoffmann wrote: > > Hi, > >> +/* Sends any keys that were delayed because they were part of the ungrab >> set */ >> +static void send_key_if_delayed(Set *the_set, int keycode) >> +{ >> +if (contains_number(the_set, keycode)) { >> +

Re: [Qemu-devel] [PATCH v7] ui/cocoa.m: Add ability for user to specify mouse ungrab key

2018-02-19 Thread Gerd Hoffmann
Hi, > +/* Sends any keys that were delayed because they were part of the ungrab set > */ > +static void send_key_if_delayed(Set *the_set, int keycode) > +{ > +if (contains_number(the_set, keycode)) { > +qemu_input_event_send_key_qcode(dcl->con, keycode, true); > +

[Qemu-devel] [PATCH v7] ui/cocoa.m: Add ability for user to specify mouse ungrab key

2018-02-16 Thread John Arbuckle
Currently the ungrab keys for the Cocoa and GTK interface are Control-Alt-g. This combination may not be very fun for the user to have to enter, so we now enable the user to specify their own key(s) as the ungrab key(s). The list of keys that can be used is found in the file qapi/ui.json under