mojira.dev
MC-12410

shift+2 does not work - LWJGL issue

While pressing shift, the number keys for the quick bar 2 and 6 do not work. Other number keys will still select that quick bar slot while pressing shift.

Linked issues

Attachments

Comments 23

Please force a crash by pressing F3 + C for 10 seconds while ingame and attach the crash report here.

Can confirm, but only with slot 2. Please post that crash report requested by Tails.

This issue has been present for years, and I believe I first noticed it sometime in 2011. shift+2 and shift+6 are ignored (makes switching quickbar items on ladders/vines using keys more tricky). I never did enough detective work to be certain, but I recall coming to the conclusion that the bug existed in LWJGL's linux support, if it is actually a bug at all; could be LWJGL debug keys that MC is not disabling.

I am fairly certain it is an LWJGL issue, but in order to compare versions we still need that crash report.

the first crash log I uploaded was for a 1.5.1-pre, which I had upgraded the LWJGL to 2.9.0 but was otherwise unmodded. the second crash log is for an unmodded 1.5 with its default LWJGL. the ignoring of shift+(2 or 6) is reproducible on either one.

13 more comments

There is an issue tracker at https://github.com/LWJGL/lwjgl/issues . You have to create a GitHub account.

Thanks. I've opened an issue on this bug there.

Closing it here since it's an LWJGL issue.

For anyone who comes across this issue today, the issue seems to have been fixed in the old version of LWJGL. I'm guessing from this commit. However, I'm not aware of any existing builds that include the fix, and pre-lwjgl3 minecraft uses a build from before the fix. To use the latest code, you can compile the jar yourself from https://github.com/LWJGL/lwjgl, or download the jar I've compiled from https://afuous.github.io/lwjgl-git-20161208.jar (ipfs). Here's how I'm using this jar with the new launcher (1.8.9 can be replaced by any other version, including modded):

  • Create a directory .minecraft/libraries/org/lwjgl/lwjgl/lwjgl/git-20161208 and put the new jar lwjgl-git-20161208.jar inside it

  • Copy .minecraft/versions/1.8.9 to .minecraft/versions/1.8.9-lwjglpatch

  • Inside .minecraft/versions/1.8.9-lwjglpatch, rename 1.8.9.jar and 1.8.9.json to 1.8.9-lwjglpatch.jar and 1.8.9-lwjglpatch.json

  • Make two modifications to 1.8.9-lwjglpatch.json:

    • Replace

      "id": "1.8.9"

      with

      "id": "1.8.9-lwjglpatch"
    • Replace

      {"downloads": {"artifact": {"path": "org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar", "sha1": "697517568c68e78ae0b4544145af031c81082dfe", "size": 1047168, "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar"}}, "name": "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209", "rules": [{"action": "allow"}, {"action": "disallow", "os": {"name": "osx"}}]}

      with

      {"downloads": {"artifact": {"path": "org/lwjgl/lwjgl/lwjgl/git-20161208/lwjgl-git-20161208.jar", "sha1": "4bd3b4a0772d1987d24ecaee0558e740e99ec435", "size": 1057569, "url": ""}}, "name": "org.lwjgl.lwjgl:lwjgl:git-20161208", "rules": [{"action": "allow"}, {"action": "disallow", "os": {"name": "osx"}}]}

      If you compiled your own jar, make sure to replace the "sha1" and "size" fields with the sha1sum and size in bytes of your jar.

  • Now you can select the 1.8.9-lwjglpatch version from your launcher and hotkey to 2 and 6 while sneaking!

Instructions to compile the jar yourself:

  • Install the Ant build tool for java

  • Run

    git clone https://github.com/LWJGL/lwjgl
    cd lwjgl
    ant jars
  • The jar will be created at libs/lwjgl.jar

zol

(Unassigned)

Plausible

Minecraft 1.5

Retrieved