This week's book giveaways are in the Cloud and AI/ML forums. We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line! See this thread and this one for details.
Sorry, I couldn't come up with a better thread title - if anyone has a suggestion feel free to report to mods for modify.
As I'm a player of Minecraft I came up with this: Why not use F13 - F24?
Reason: Although "vanilla" Minecraft is fine with around 20 key bindings, when you play it with modifications you encounter the problem of quickly run out of possible key bindings. Another issue: differnt keyboad layout - but that's beyond this topic.
To test if Minecraft is even capable of using F13 - F24, wich is supported by Java natively, I came up with a rather complicated test: I quickly set up a "server" wich received keycodes from another PC in my LAN (wich ran a "client" sending some) - yes, it works (although a bit delayed cause of TCP - guess this could be fixed with UDP).
As my keyboard is not able to produce inputs for F13 - F24 (it's an Logitech K800) I thought I could use a small extra code to send such keycodes. The issue I encountered: Robot in awt package only sends keycodes to current active window. So if I set up a small GUI with buttons for the "2nd row Fn-keys" it would send the key presses to this instead of Minecraft as its window has the current focus. I already came up with the idea of using a FocusListener and queue up the keys until the window lose focus (wich happens when I click back in the Minecraft window). But this doesn't work as when Minecraft window loses focus it pops up a menu wich as to be closed before the key presses would do what they should. Sadly, when sending a press/release VK_ESCAPE to close the menu isn't reliable as there could be additional delay after closing the menu (or closing the text prompt when opened before window lose focus).
Has anyone other ideas how this may could be accomplished?