Mouse Buttons Close Inventory
by Iridium
Mouse Buttons Close Inventory lets a mouse button that opens the inventory also close it, fixing a long-standing Minecraft binding bug.
What it does
In vanilla Minecraft, a key or mouse button bound to opening the inventory cannot close it again; only Escape or the same keyboard key does. This Forge mod changes that so the bound mouse button closes the inventory too. It is a client-side only mod, so only the client needs it, and servers run without it. Builds cover 1.18.2 – 1.19.4 across six release versions, with 0.0.1-1.19.4 for 1.19.4 as the latest file. The code is open source under the MIT License.
Key features
Mouse button closes inventory
A mouse button bound to Open/Close Inventory also closes the inventory screen when pressed again.
Open-only binding fixed
Without the mod, a rebound mouse button can only open the inventory; this change makes the toggle work as the binding suggests.
Tracked upstream bug
The fix addresses the Minecraft bug tracked as MC-156810, which has existed for nearly ten years.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
How it compares
MouseKeyInventoryFix covers the same mouse-key inventory problem, is client-side only, open source under the CC0 1.0 Universal license, and published for Fabric and Forge across 1.16 – 1.20.4. Toggle Perspective Fix is a Forge-only, client-side mod for 1.8.9, open source under the MIT License.
| Mod | Loaders | Game versions | Environment | Updated |
|---|---|---|---|---|
| Mouse Buttons Close Inventory | Forge | 1.18.2 – 1.19.4 | Client-side only | 2023-07-13 |
| MouseKeyInventoryFix | Fabric and Forge | 1.16 – 1.20.4 | Client-side only | 2024-01-12 |
| Toggle Perspective Fix | Forge | 1.8.9 | Client-side only | 2023-05-27 |
Questions
Does Mouse Buttons Close Inventory need to be installed on the server?
In the catalog
Mouse Buttons Close Inventory is one of 36,990 Utility mods on ModsFinder, and one of 14,575 Utility mods for Forge. 9,374 mods support Minecraft 1.19.4.
More from Iridium
Similar mods
What the author says
Minecraft allows you to rebind the "Open/Close Inventory" key to a mouse button - however doing so will allow you to only open your inventory with that button, not close it. This is a fix for that for Forge versions of Minecraft.
Official listing
- Modrinth page
- modrinth.com/mod/mouse-buttons-close-inventory
- Owner
- Iridium
- Published
- 2023-07-13
- Updated on Modrinth
- 2023-07-13
- Facts verified
- 2026-10-15
