MacOS – How (or where) I can set keyboard shortcut to “add new desktop place”

desktopkeyboardmacos

please, how to set up keyboard shortcut to "add new desktop place", that must be added via "Mission Control" and by mouse click to "plus button" (top right corner)?? I'm looking at "system preferences" -> "keyboard" -> "Shortcut" … but there is no any settings for "add new desktop" or someone same.

Is there any way to set up this shortcut ??

Many thanks for ideas.

Best Answer

You could use this script then make a shortcut to it in Automator.

In Mavericks, Applescript to create a new Space in Mission Control

delay 0.5 -- time to release command if the script is run with command-R
tell application "System Events"
    key code 126 using control down -- control-up
    delay 1
    do shell script "MouseTools -x 1900 -y 60;sleep 1;MouseTools -leftClickNoRelease;MouseTools -releaseMouse"
    key code 53 -- escape
end tell

source https://stackoverflow.com/a/22873544

Get the MouseTools