[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/arm/musicpal: Convert to qemu_add_kbd_event_handler()
|
From: |
Alex Bennée |
|
Subject: |
Re: [PATCH] hw/arm/musicpal: Convert to qemu_add_kbd_event_handler() |
|
Date: |
Fri, 19 Jan 2024 11:24:39 +0000 |
|
User-agent: |
mu4e 1.11.27; emacs 29.1 |
Peter Maydell <peter.maydell@linaro.org> writes:
> Convert the musicpal key input device to use
> qemu_add_kbd_event_handler(). This lets us simplify it because we no
> longer need to track whether we're in the middle of a PS/2 multibyte
> key sequence.
>
> In the conversion we move the keyboard handler registration from init
> to realize, because devices shouldn't disturb the state of the
> simulation by doing things like registering input handlers until
> they're realized, so that device objects can be introspected
> safely.
>
> The behaviour where key-repeat is permitted for the arrow-keys only
> is intentional (added in commit 7c6ce4baedfcd0c), so we retain it,
> and add a comment to that effect.
Well the key input all works as intended and looks good to me. I'm a
little disappointed I couldn't get audio working on the musicpal machine
but that is not a problem for this patch.
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro