Re: [Qemu-devel] [RFC PATCH v2 1/7] kbd-state: add keyboard state tracker

2019-01-22 Thread Gerd Hoffmann
> > + * the corresponding key-down event wasn't send to the guest, > > s/send/sent/ Fixed. > > +void kbd_state_lift_all_keys(KbdState *kbd) > > +{ > > +int qcode; > > + > > +for (qcode = 0; qcode < Q_KEY_CODE__MAX; qcode++) { > > +if (test_bit(qcode, kbd->keys)) { > > +

Re: [Qemu-devel] [RFC PATCH v2 1/7] kbd-state: add keyboard state tracker

2019-01-22 Thread Eric Blake
On 12/19/18 6:08 AM, Gerd Hoffmann wrote: > Now that most user interfaces are using QKeyCodes it is easier to have > common keyboard code useable by all user interfaces. > > This patch adds helper code to track the state of all keyboard keys, > using a bitmap indexed by QKeyCode. Modifier state i

Re: [Qemu-devel] [RFC PATCH v2 1/7] kbd-state: add keyboard state tracker

2018-12-21 Thread Daniel P . Berrangé
On Wed, Dec 19, 2018 at 01:08:58PM +0100, Gerd Hoffmann wrote: > Now that most user interfaces are using QKeyCodes it is easier to have > common keyboard code useable by all user interfaces. > > This patch adds helper code to track the state of all keyboard keys, > using a bitmap indexed by QKeyCo

[Qemu-devel] [RFC PATCH v2 1/7] kbd-state: add keyboard state tracker

2018-12-19 Thread Gerd Hoffmann
Now that most user interfaces are using QKeyCodes it is easier to have common keyboard code useable by all user interfaces. This patch adds helper code to track the state of all keyboard keys, using a bitmap indexed by QKeyCode. Modifier state is tracked too, as separate bitmap. That makes check