Iskallia / Vault-public-S1

👾 (Legacy) A mod that adds the mystic vaults for Vault Hunters modpack. (Public port of the Livestream version)
GNU General Public License v3.0
84 stars 40 forks source link

Select and use ability keybinds do not respect Ctrl/shift requirement #1027

Open Alexithemia opened 2 years ago

Alexithemia commented 2 years ago

Ctrl + (key) inputs for vault abilties don't respect the Ctrl requirement. image In my setup above, just pressing 1 uses dash, with or without Ctrl. It works with other controls, setting Ctrl + 1 to Jump works as expected, only jumping when 1 is pressed along with Ctrl. I have tested this with other mods as well, the keybind will not fire for them unless the Ctrl or Shift key is held as well.

Steps to reproduce the behavior:

  1. Have an ability unlocked (dash etc.) and set the Switch to and use Keybind to a CTRL + (key) or Shift + (key)
  2. Press the key assigned without holding control
  3. Ability is used with or without CTRL or Shift
  4. Reset Keybind and set the CTRL + (key) or Shift + (key) to a keybind in another mod or Vanilla Minecraft.
  5. Press the key itself, the keybind does not occur, hold CTRL or Shift with the key and it works as expected.

Binding these abilities is important for quick use in the game, and this setup seems to make the most sense to me. The keybinds work normally for other mods, so it should also be able to be supported here.

Alexithemia commented 2 years ago

This may be due to using net.minecraft.client.settings.KeyBinding; instead of net.minecraft.client.KeyMapping;? From checking into other mods code that works with the Control Key modifier, they use KeyMapping

https://github.com/Iskallia/Vault-public-S1/blob/a22f15c9cd41ea2e7de66c3d76ff1f4c83dea92b/src/main/java/iskallia/vault/init/ModKeybinds.java#L4