Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-265853

Controls bound to "SLEEP" in 1.12.2 and earlier become unbound when upgrading to the latest version

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 1.20.2, 23w41a
    • Plausible
    • Input

      The bug

      If an in-game control is bound to the SLEEP key (numeric ID 223 in options.txt) in 1.12.2 or a prior version (likely in conjunction with the system settings being configured such that the system does not enter sleep mode when the button is pressed), and then a newer version is loaded, that control will be set to "Not Bound".

      It is still possible to bind controls to this key in modern versions, in which it displays as "scancode.351" (see MC-170376), leading me to believe that the control becoming unbound is not intended, although the fix for this should preferably include a fix to MC-170376 for at least this specific button.

      How to reproduce

      1. Have a keyboard with a "sleep" key - I'm using the Microsoft Natural Multimedia Keyboard 1.0A
      2. Load up version 1.12.2 or earlier
      3. Bind a control to this key
      4. Quit out of the game
      5. Load up the latest supported version in that same profile
      6. Check your key binds menu

      Expected results

      The control that was bound to "SLEEP" would automatically be converted over to a key named something along the lines of "Sleep".

      Actual results

      That control now says "Not Bound".

      How to fix

      Have old options.txt files which bind a key to 223 convert this over to scancode.351 (or preferably an actually named key ID which replaces this) instead of key.keyboard.unknown.

      Further notes

      Binding controls to the SLEEP key (in both 1.12.2 and before, and the latest supported version) works for some keyboards that have it, but not others. It works for the Microsoft Natural Multimedia Keyboard 1.0A, but not the Cherry DC 2000. This is very likely to be a GLFW bug.

        1. 2023-10-16_23.12.27.png
          34 kB
          Connor Steppie
        2. 2023-10-16_23.14.24.png
          62 kB
          Connor Steppie

            Unassigned Unassigned
            Awesoman3000 Connor Steppie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: