Is there a way to use the CMD button in the right side as a different button?
You can use KeyRemap4MacBook (Karabiner) to remap your keyboard.

Karabiner

A powerful and stable keyboard customizer for OS X.

 - You can easily customize from prepared settings.
 - You can also add your own settings by XML.


https://pqrs.org/osx/karabiner/