Applied Energistics 2

Applied Energistics 2

137M Downloads

Pressing any modifier focuses the search field in any terminal screen

shartte opened this issue ยท 3 comments

commented

(It shouldn't)

commented

That might be caused by how minecraft handles key presses.

Alphanumeric and special characters keys in auto mode should autofocus the input field. The question is now, should this also apply to modifiers and other control keys. Do we really want to start whitelisting/blacklist certain keys?
I certainly don't want to go through HID Keyboard page 53 ff. and start making exceptions for each. E.g. it would make sense for space/backspace/del. Probably tab for focus (if that isn't already handled specially). All F1-F24 keys? etc.

commented

Nah, you just need to blacklist the keys that we use ourselves for inventory interactions.
I.e. SPACE+Click, SHIFT+Click, etc.
Those should not cause the search field to become focused if it isn't already focused.

commented

Focus happens (currently) on key down not release. So we either have to change that completely to on release, which as far as I am are is completely against anything in minecraft. So it might feel clunky.

Or there is also net.minecraft.client.gui.INestedGuiEventHandler.charTyped(char, int). That might be more fitting for text inputs.