See rom/hidd/keyboard and rom/hidd/mouse in AROS source code.CMD_HIDDINIT private function from keyboard.device and gameport.device has been removed and now these devices use a new keyboard and mouse HIDDs as an underlying level. Actual driver HIDDs may be plugged in or removed at any time using AddHardwareDriver() and RemHardwareDriver().
The API can be further expanded if one day we want to implement OS4 amigainput.library or something like that.
There can be multiple input drivers (feeders) and now there can also be multiple input listeners.
So, lowlevel.library can also work on top of the new API and receive events on its own, independently of keyboard.device and gameport.device.
== References ==
To debug: dump mouse events when they are fed to supplied handler. You may also write hidd.mouse client which reads and prints mouse events. This way you'll be able to monitor how events are passed through top-level mouse.hidd.
Also introduced top-level "hubs" for mouse and keyboard events.
May be ps2mouse.hidd sends malformed events.