Minecraft wiki entry for Inventory, associated text: Holding ⇧ Shift and clicking on the item sends the item from the player's hotbar to the main 27 slots, or vice versa. Doing so, while a block's inventory (chest, dispenser, etc.) is open, sends the item stack immediately from the player's inventory into the block that they have open or vice versa. Holding ⇧ Shift and double-clicking a stack moves all items of that kind between the player's inventory and the block, or their inventory and their hotbar. However, the player's cursor must already be holding an item for this to work. The item held is irrelevant.