Chosen Solution
Recently, I got my MacBook Pro Mid-2012 13-inch Keyboard replaced. Initially, it was working perfectly. All of sudden (while typing), I noticed that my Delete Key stop working. Then I started checking other keys also and go to know that my Volume keys are behaving differently. I mean when I press them they do work correctly, but they don’t do the stock commands like turning the volume up, down, brightness, next song, etc. I came to know about the Keyboard Viewer and to my surprise, I saw that the fn key is pressed by default. As far as I remember, I never pressed the fn key. Tried lots of solutions like resetting NVRAM, and the checkbox under the System preferences -> Keyboard. I don’t know what is the exact issue. Sharing the link for the Image and Video reference.
So, one of three problems could be going on: One, the keyboard ribbon cable might have come loose from the socket in the logic board. Two, the socket itself is loose from the logic board (like if the cable was yanked out and the socket tried to go with it). Three, The keyboard itself is broken, but this is unlikely because an entire section of keys are broken. This sounds like something just came loose. Try reseating your keyboard cable and see if that does the trick.