[MC-577] Mouse buttons block all inventory controls that are not default Created: 25/Oct/12  Updated: 10/Dec/24

Status: Reopened
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2, Minecraft 1.4.5, Minecraft 1.4.7, Snapshot 13w04a, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w26a, Minecraft 1.6, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w38c, Minecraft 1.7.9, Minecraft 14w17a, Minecraft 14w18b, Minecraft 14w32a, Minecraft 14w32b, Minecraft 14w32c, Minecraft 14w32d, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.4, Minecraft 1.10, Minecraft 1.10.1, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w35a, Minecraft 16w36a, Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.1, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13b, Minecraft 17w15a, Minecraft 17w16b, Minecraft 17w17b, Minecraft 17w18b, Minecraft 1.12 Pre-Release 2, Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43b, Minecraft 18w15a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, 1.15.2, 20w10a, 20w16a, 20w18a, 1.16 Pre-release 2, 1.16.1, 1.16.2 Pre-release 1, 1.16.2 Pre-release 2, 1.16.2 Release Candidate 1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1 Pre-release 2, 21w42a, 1.19, 1.19.2, 1.19.3, 23w03a, 23w04a, 1.19.4, 1.20.1, 23w33a, 1.20.2 Pre-release 2, 1.20.2 Release Candidate 1, 1.20.2, 23w43b, 23w45a, 23w46a, 1.20.3 Pre-Release 1, 1.20.3 Pre-Release 2, 1.20.3, 1.20.4 Release Candidate 1, 1.20.4, 24w04a, 24w12a, 24w14a, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.3, 1.21.4
Fix Version/s: None

Type: Bug
Reporter: [Mod] turbo Assignee: Unassigned
Resolution: Unresolved Votes: 64
Labels: None

Issue Links:
Duplicate
is duplicated by MC-6589 Cannot close inventory via Middle-cli... Resolved
is duplicated by MC-8225 Use item hardcoded to Right Mouse Click Resolved
is duplicated by MC-11676 Mouse button #3 doesn't work with new... Resolved
is duplicated by MC-19433 When using Inventory-related item (cr... Resolved
is duplicated by MC-25002 Changing "Use Item" Controls Away Fro... Resolved
is duplicated by MC-29234 Change Button "Use Item" don't work p... Resolved
is duplicated by MC-30691 Mouse Button shortcuts don't work in ... Resolved
is duplicated by MC-41085 Crafting "right click" does not use b... Resolved
is duplicated by MC-46022 setting "button 2" as something else,... Resolved
is duplicated by MC-78497 Bug in keybinding Resolved
is duplicated by MC-85477 Rebinding Inventory to an auxiliary m... Resolved
is duplicated by MC-101400 Incomplete key reassignment Resolved
is duplicated by MC-107047 Cannot drop items from the inventory ... Resolved
is duplicated by MC-117873 Inventory will open when keybinded to... Resolved
is duplicated by MC-173962 Mouse buttons bound to hotbar don't w... Resolved
is duplicated by MC-192429 Custom inventory buttons not working Resolved
is duplicated by MC-210709 Using a side button on a mouse to 'dr... Resolved
is duplicated by MC-217566 Rebinding open/close inventory to mid... Resolved
is duplicated by MC-254971 Can't drop items from inventory when ... Resolved
is duplicated by MC-266222 Inventory won't close when bound to a... Resolved
is duplicated by MC-267036 Key binds meant for the mouse break f... Resolved
is duplicated by MC-269690 Ctrl + Q doesn't work if you use a mo... Resolved
is duplicated by MC-273560 Changing the Open Inventory control r... Resolved
is duplicated by MC-277551 When open/close inventory is bound to... Resolved
is duplicated by MC-278779 Mouse Buttons not closing inventory Resolved
is duplicated by MC-286 Hotkey for mac issues Resolved
is duplicated by MC-622 Right Click in Inventory Resolved
is duplicated by MC-3911 Key Mapping bug Resolved
Relates
relates to MC-117771 Pick block changed to a keyboard key ... Open
relates to MC-179929 key.mouse.4 and key.mouse.5 don't wor... Open
relates to MC-145691 Binding "Open/Close Inventory" to Tab... Resolved
relates to MC-91315 Some inventory controls can't be reco... Reopened
relates to MC-141942 Rebound "pick block" doesn't work in ... Reopened
relates to MC-189570 Middle Mouse Button does not work as ... Resolved
CHK:
Confirmation Status: Confirmed
Category:
Accessibility, UI
Mojang Priority: Normal
Area: Platform

 Description   

The Bug:

If you change any controls to Button 1, 2, 3, etc., you won't be able to use them inside of the inventory.

Steps to Reproduce:

  1. Rebind Attack/Destroy to any unused button.
  2. Rebind Drop Selected Item to the mouse button.
  3. Try to use this button.
    It drops items as expected.
  4. Open your inventory and try to use the button.
    It won't drop any items.

Note: Due to MC-91315, you can only use Drop Selected Items, Hotbar Slot #, and Open/Close Inventory to reproduce.

Code Analysis:

Code analysis by Elephant_1214 can be found in this comment.



 Comments   
Comment by BugTracker [ 07/Apr/24 ]

Also affects 24w14a.

Comment by EhlDelHackh [ 22/Mar/24 ]

It's hard to believe that this bug still after all the time I spent playing this game. I mean, I don't remember any version when this feature worked well. I understand that many people don't have the need of change keybinds to the mouse, but is very uncomfortable for all the players that have to whatever the reason

Comment by Brain81505 [ 01/Feb/23 ]

Can confirm in 23w06a

Comment by Brain81505 [ 25/Jan/23 ]

Can confirm in 23w04a

Comment by Brain81505 [ 18/Jan/23 ]

Can confirm in 23w03a

Comment by Elephant_1214 [ 14/Jul/22 ]

This bug was reported almost ten years ago and is still an issue in release 1.20.4. It's easy to fix; all that has to be changed to correct the bug is to add these two if statements/branches to the method checkHotbarMouseClicked inside the AbstractContainerScreen class.

Edit: Updated the code snippet with things that I have noticed since initially writing this

// Add this to the beginning of the method
if (this.minecraft.options.keyInventory.matchesMouse(button)) {
    this.onClose();
    return;
// Add this to the first nested if statement
} else if (this.minecraft.options.keyDrop.matchesMouse(button)) {
    this.slotClicked(this.hoveredSlot, this.hoveredSlot.index, hasControlDown() ? 1 : 0, ClickType.THROW);
    return;
Comment by KosmX [ 08/Jun/21 ]

1.17 still not fixed.
(Luckily Java edition is moddable)

Comment by Ilya Pelmen [ 27/May/21 ]

1,16,5 still has this issue

Basically this bug means that in inventory screen controls binded to mouse buttons dont work. Tried to play minecraft using only mouse, and stuck immediately because you cant close inventory if its binded to mouse key

Comment by Conem [ 17/Jun/20 ]

Confirmed in 1.16-pre7.

Comment by Conem [ 12/Jun/20 ]

Confirmed in 1.16-pre5.

Comment by Conem [ 08/Jun/20 ]

Confirmed in 1.16-pre2.

Comment by Alugia [ 16/Apr/20 ]

confirmed in 20w16a

Comment by one_zaccy_boi [ 09/Apr/20 ]

Present in 1.15.2 still

Comment by [Helper] clam lol [ 24/Aug/18 ]

Present in 1.13.1

Comment by HalfOfAKebab [ 03/Aug/17 ]

Confirmed in 1.12.1-pre1.

Comment by HalfOfAKebab [ 23/Jul/17 ]

Confirmed in 1.12.

Comment by SunCat [ 04/Sep/16 ]

There are 2 bugs in this ticket:

  1. Mouse buttons block all inventory controls that are not default (Also MC-11676 and MC-6589)
  2. Some inventory controls can't be configured (Affects Button 1, Button 2, LShift (MC-91315, MC-81042), LCtrl)

Fixed

Comment by Fabian Röling [ 22/Jun/16 ]

Confirmed for 1.10.1.

Comment by Fabian Röling [ 09/Jun/16 ]

Confirmed for 1.10 and pretty much everything in between.
If this gets fixed, would a switch of left and right click make it so that right click is used for picking up and putting down stacks and left click would split them? Because I like it how it is now. But I don't think it's intended, because it's not at all possible to remap inventory keys this way. A fix that's good for both would require extra keys for that and that again would require a change of the key system of Minecraft. Maybe ignoring conflicts and just triggering both actions if there is one key selected for two actions.

Comment by user-f2760 (Inactive) [ 17/Mar/16 ]

No response for over a year.

Comment by Galaxy_2Alex [ 23/Oct/14 ]

Is this still a concern in the current Minecraft version 1.8.1 Prerelease 3 / Launcher version 1.5.3 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by Tintti214 [ 11/Aug/14 ]

Still reproduceable in 14w32d

Comment by Itouch2 [ 07/May/14 ]

Confirmed for 14w18b.

Comment by [Mod] Ezekiel (ezfe) [ 04/Apr/14 ]

Is this still a concern in the latest Minecraft version 14w11b? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by [Mod] Ezekiel (ezfe) [ 24/Sep/13 ]

Zombie, just because they rewrote the menu doesn't mean they changed how controls are recognized.

Comment by _zombiehunter [ 24/Sep/13 ]

Still not fixed in 13w38c, even after the devs revamped the whole controls menu !

Comment by Wesley Wright [ 27/Jun/13 ]

Yeah just found this in 1.6 (My issue was apparently a duplicate, it redirected here).

Comment by Anon Ymus [ 05/Apr/13 ]

Confirmed in 1.5.1.

Comment by Dojorune [ 25/Oct/12 ]

confirmed, looks like the "select half" option is hardwired to button 2 and isn't remapped with the use item binding.

Generated at Sun Jan 12 11:51:30 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.