KeyBindingHelper removes conflicting vanilla keybinds
Stuff-Stuffs opened this issue ยท 2 comments
If a modded key uses the same keycode as a vanilla keybinding, the vanilla keybinding is removed. This happens because of line 80 in KeyBindingRegistryImpl, which tries to remove previous modded keybinds before readding them. However KeyBinding has equals() overridden, it is true whenever the boundKey is equivalent, this happens whenever the InputUtil.Type and keycode are the same. This means that any vanilla KeyBinding disappears if a modded keybinding has the same code and type.
I think the fix is to find and remove the duplicates based on their reference equality rather than their normal equality, which just compares bound keys.