Run Keyboard Shortcut inside Apple Shortcut

Hi, I would like to make a shortcut enter a keyboard short, CMD+m to be precise. Note that I dont want to run the shortcut when pressing CMD+m. The shortcut should press CMD+m, if that makes sense. Is javascript an option? How would the code look like?