-
-
Notifications
You must be signed in to change notification settings - Fork 59
Add 'send keys' option for neoforge #695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: multiversion/dev
Are you sure you want to change the base?
Add 'send keys' option for neoforge #695
Conversation
NeoForge doc suggests handling via Mod loaders sometimes introduce breaking changes across versions, so this could risk breaking Controlify for some versions. |
| @Mixin(KeyMapping.class) | ||
| public interface KeyMappingAccessor { | ||
| //? < 1.21.4 && neoforge { | ||
| @Accessor("ALL") | ||
| static Map<String, KeyMapping> getAll() { | ||
| throw new NotImplementedException("Should be overwritten by Accessor"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be mainly for compatibility with some NeoForge mods, so shouldn't it be part of the platform.neoforge.mixin package and registered using the mixin controlify-platform.neoforge.mixins.json?
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. |
Yeah, I agree, many if not most mods.
I would still provide an addon or config, maybe? |
Some neoforge mods choose to subscribe to
InputEvent.Keyto 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.