Handling the screen input for resetting the selectedKey low-level inside of a Keyboard mixin results in problems with other mods trying to interact with the Controls screen using the regular means (e.g. via ScreenMouseEvents). This would most likely be resolved if amecs-api used a screen mixin (so that it would respect the loader's screen events), or used the native mod loader screen input events directly.
https://github.com/Siphalor/amecs-api/blob/cross-version/src/main/java/de/siphalor/amecs/impl/mixin/MixinKeyboard.java#L92-L100
This currently makes amecs-api incompatible with mods using KumaAPI for their key bindings (e.g. Crafting Tweaks and Inventory Essentials on 1.21.11).