How to edit the Finder context menu when no file or folder is clicked I want to create shortcuts like "Copy path of current folder" and "Open terminal in current folder" in the screenshotted context menu. I know how achieve this with Services and Automator but only for when a file or folder is right-clicked. How do I do it when a blank area is right-clicked?
You asked, "How do I do it when a blank area is right-clicked?", well sans the content of the default context menu, I believe something has to be selected to be acted upon otherwise you'll always just get the default context menu. That said though, you could create an Automator Service that receives no input in Finder and assign it a keyboard shortcut. Then using AppleScript, you would code it to do what you want based on the target property of the front window of Finder.

The following two example AppleScript code segments can be used in a Run AppleScript action in an Automator Service to which a keyboard shortcut can be assigned or as an AppleScript Application created in Script Editor and the app dragged and dropped onto the Toolbar in Finder.

This example copies to the clipboard the POSIX path of the current folder of the front Finder window:

try
    tell application "Finder"
        set the clipboard to text items 1 thru -2 of POSIX path of (target of front window as string) as string
    end tell
end try 


This example opens Terminal to the current folder of the front Finder window:

try
    tell application "Finder"
        set theTargetPath to text items 1 thru -2 of POSIX path of (target of front window as string) as string
    end tell
    tell application "Terminal"
        do script "pushd " &amp; theTargetPath &amp; "; clear"
        activate
    end tell
end try


That said though, the only other thing I can think of would be to use Xcode and create a Service or App Extension to do what you're asking, if it's even doable.



Note: The example AppleScript code is just that and, sans the try statement as an error handler, does not include any other error handling as may be appropriate/needed/wanted, the onus is upon the user to add any appropriate error handling for any example code presented.