Remap shortcut/command keys

I wonder if some method to remap shortcut/command keys exists. In default configuration K on keyboard is for play/pause script, M is for menu. These two buttons are close neighbours so sometimes I accidentaly press M against K and then script stops. How to avoid that? Most simple in my opinion could be custom keyboard shortcuts. Is it possible to do?