Either click on the “Stop Recording” button on the menu bar or press Command + Control + Esc.