
Too many debug messages on key held
Naheulf opened this issue ยท 1 comments
Description of the Issue
MaLiLib send too many messages if one key is held.
Steps to Reproduce the Issue
- Run minecraft in a way you can see the stdout (console output)
- Open malilib config
- Set keybindDebugging to true
- Press and hold any key for few seconds
- Release the key
Expected Behavior
Only two or three messages should be send:
"PRESS D (32), held keys: D (32)"
"held keys: D (32)" (optional)
"RELEASE D (32), held keys: "
Actual Behavior
The "PRESS " message is send many times per second
[15:42:24] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:24] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:24] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:24] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:24] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:24] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:24] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:24] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:25] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:25] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:25] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:25] [Client thread/INFO] [malilib]: PRESS D (32), held keys: D (32)
[15:42:25] [Client thread/INFO] [malilib]: RELEASE D (32), held keys: <none>
Debug Information
Tested with theses mods:
- forge | 14.23.5.2836 | forge-1.12.2-14.23.5.2836-universal.jar
- MaLiLib | 0.10.0-dev.21.pre2 | malilib-forge-1.12.2-0.10.0-dev.21.pre2.jar
- itemscroller | 0.15.0-dev.20190722.0 | itemscroller-forge-1.12.2-0.15.0-dev.20190722.054145.jar
This happens in GUIs or other contexts where Keyboard.enableRepeatEvents(true)
has been called. As far as anything using key events is concerned, those repeat events are the same as the normal initial key press. So this is pretty much working as intended, although it's true that it gets very spammy.
I think I could add an option to the keybind debugging to basically omit those repeat event messages if they are not desired, but I won't hard-code remove those completely as they can be useful/vital in some cases.