Command, tab, and mouse click not working, rest of keyboard and mouse movement still works
Solution 1:
This is a puzzler and at first I was thinking, "wonky keyboard or keyboard controller."
But before I go blaming hardware it would be best to see if the issue is related to software.
Most, if not all, keyboard customizations are done on a user by user basis and if they are not set in System Preferences they would be set by something that ran at login or startup.
- Restart your Mac while holding the ⇧ Shift key. When you see the Apple logo you can release the key. Startup may take a lot longer. If that fixes the issue there is something installed that is causing the issue. If nothing changes...
- Create another user. Log in as that user. Still have the problem? Hopefully not. If not then there is something in your user profile messing with your keyboard. You can start deleting/moving/etc. preference files and the like, but I would be inclined to just migrate your files to the new profile and delete the old one.
Neither one of these worked? Add your results to your original question and we will take another stab at it.