Zergatul / cheatutils

MIT License
33 stars 11 forks source link

Issues with conflicting keybinds #64

Open I0u0I opened 5 months ago

I0u0I commented 5 months ago

When mod is installed I am unable to use conflicting keybinds e.g. left shift for sneak, and for comparing items in inventory, or z for crawl and a wand interaction.

This may be a fringe case for some, but when using mod with packs such as "All of Fabric", or other kitchen sink mods, it renders it unusable due to the amount of conflicting keybinds.

To recreate:

Install modpack "All of Fabric 7", add content - this mod - Load a world and press left shift.

Expected behaviour: Crouch/Sneak. Actual behaviour: Nothing.

Unbinding left shift from it's secondary keybind causes sneak to work, however uninstalling the mod allows it to work despite having conflicting keybind.

Zergatul commented 5 months ago

Ok, I see. I don't actually need to install any other mod. Conflicting keybindings don't work with just single cheatutils mod.

Zergatul commented 5 months ago

Ok, I was comparing this to Forge behavior. Forge guys actually made change to vanilla Minecraft keybindings code, and if you click some key on keyboard, they search for all keybindings bound to this key, and register click for them. Vanilla code (and Fabric default behavior) is to find first keybinding (I don't what is the rule for the first) and register click only for this keybinding. This can easily be checked, if you register 2 vanilla keybindings to the same key, like Drop Item and Toggle Perspective. If you press this key, Forge will perform 2 actions, but Fabric only one. Maybe some of mods in this modpack tweaks this behavior and allow to use conflicting keybindings like Forge does. As for your problem, if you want me to fix some compatibility issue you need to find exact mod which causes it by yourself. Sorry, I am not gonna search across 320 mods just to fix issue for you. And if you find the mod causing conflict it should be open source.