I can't destroy or place blocks, what do I do?

So I was playing survival single player Minecraft and for some strange reason, I couldn't destroy or place blocks, I checked that I wasn't on adventure mode (I wasn't), so I went on creative (gamemode 1) and whenever I tried to destroy blocks the item that I tried to destroy would go into my inventory, then I tried to place down a block and the same thing happened. I was definitely on the right gamemode I tried restarting Minecraft but nothing worked! what do I do?
Best Answer
Check your controls in your settings. If they go into your inventory, then your Pick Block button (Default Middle Mouse) is bound to both destroy and place. Maybe a friend of yours wanted to troll and changed your settings?
Pictures about "I can't destroy or place blocks, what do I do?"



Nas - I Can (Official HD Video)
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Brett Jordan, Brett Jordan, Ketut Subiyanto, Plato Terentev