One of my keys activate the command key for no reason
What model Mac are you using, there has been some issues with the keyboards on some of the newer Macs.

you can use canned air to clean things out on these keyboards. 

or if that doesn't work there is a replacement program:

https://www.apple.com/support/keyboard-service-program-for-macbook-and-macbook-pro/