Controlify icon indicating copy to clipboard operation
Controlify copied to clipboard

Add 'send keys' option for neoforge

Open ninjaguardian opened this issue 2 months ago • 3 comments

Some neoforge mods choose to subscribe to InputEvent.Key to handle input detection, which the current system does not support. I added a keybind for the radial menu so that, when pressed, it will close the screen (some mods check if the screen is null) and send the click input.

The code in this pr supports all Neoforge versions in Controlify.

There seems to be no reason to port this to Fabric, as I've yet to see a Fabric mod look for keyboard inputs directly.

ninjaguardian avatar Oct 17 '25 22:10 ninjaguardian

Some neoforge mods choose to subscribe to InputEvent.Key to handle input detection

NeoForge doc suggests handling via ClientTickEvent.post, so it's probably better to update these mods to do that instead, like this PR.

Mod loaders sometimes introduce breaking changes across versions, so this could risk breaking Controlify for some versions.

EchoEllet avatar Oct 29 '25 10:10 EchoEllet

NeoForge doc suggests handling via ClientTickEvent.post, so it's probably better to update these mods to do that instead

That is a good point that I didn't see.

Then again, there's possibly a lot of mods that use this bad system.

I'll think about whether to close this.

ninjaguardian avatar Nov 12 '25 22:11 ninjaguardian

Then again, there's possibly a lot of mods that use this bad system.

Yeah, I agree, many if not most mods. InputEvents aren't meant for handling in-game input.

I'll think about whether to close this.

I would still provide an addon or config, maybe? Let's wait for an answer from the author.

EchoEllet avatar Nov 12 '25 23:11 EchoEllet