IC2 Doesnt support Ctrl or Shift or Alt + other key feature, and a mouse issue

  • Forge implemented this feature where you can make 2 keys on 1 keybinding if you use shift, ctrl, alt as key basement on the keybinding.

    Sadly IC2 Keys (and classic did it until the comming patch too) doesn't support that feature at all.


    Reason being they ask the gamesettings if the key is pressed or not.

    To fix that change this line:

    Code
    if (GameSettings.isKeyDown(this.altKey))

    to this:

    Code
    if(altKey.isKeyDown())


    This could fix also a issue with the mouse i found in IC2Classic. When you had 2 buttons mapped to a mouse that the second key was able to trigger the first key and cause it to get stuck on a state.

    But i wasnt able to validate that yet.

    Why i bring this extra thing up? Maybe because classics & exps Keybinding validator is equal. Even with different coding styles.


    Still this feature should be supported...

  • Ok i did some testing now. And i found out a little bug with. altKey.isKeyDown()


    That is bugged out in the first place. It will only work in guis and not ingame anymore.

    What the fix has to be is something like this:


    Code
    public boolean isKeyPressed(KeyBinding binding)
        {
            return GameSettings.isKeyDown(binding) && binding.getKeyConflictContext().isActive() && binding.getKeyModifier().isActive(binding.getKeyConflictContext());
        }

    Its tested and works fine. It supports DoubleKeys and makes sure that it works.

    So thats the tested fix now.


    Also thanks for the no response xD