There is a space between ⌘K and M in the documentation for Mac:
Change Language Mode ⌘K M workbench.action.editor.changeLanguageMode
So, on Mac:
- press ⌘ and K at the same time, release and then only press M.
On Windows the corresponding shortcut is similar:
- press CTRLandK together, release and then press M