Your question is interesting. I didn't know calendar could do that. So I like your idea, very much.
But I have a few areas of concern.
First, you are asking that the macro be installed as a service. To me, this is a separate topic and should be in a different thread because it's unrelated to the Calendar issue and probably a complicated thing to solve. I found a thread on this website about installing macros as a service, which I started, and I never resolved the problem.
Second, you are insisting that the trigger for the macro be control-click. That may be possible, but did you check if your mouse's buttons work in the USB Device Key Trigger? I'm not sure if all mice support that trigger.
Thirdly, you may not even need a mouse or keyboard trigger at all. If you created a macro that was triggered based on a change in clipboard text, and did a little filtering to see if the new clipboard "probably contained a date" then that's all you need to decide whether to paste the text into Calendar. This would be a really cool idea.
That third idea is so cool I'll write the code in 5 minutes and paste it here. OKAY, here's a cool macro that doesn't even require a trigger, apart from the standard CMD-C you use to copy text.... The trigger for this macro is "the system clipboard changes".
I can imagine several ways to improve this macro, but I won't bother if you don't think this is a good solution. It's cool this way because you don't have to memorize a hotkey. My brain can hold only a limited number of hotkeys. But I'll never forget how to copy text. (CMD-C)
Thanks for the replies.
Of course, I could just put the macro trigger in Global Macros with a trigger of The status menu item is selected.
The reason I thought of the Services menu is because it's routine to control click to do something to a text selection. macOS has many actions built in.
I was just surprised to find that add item to Calendar isn't built in.
I will investigate Automator, which can create Services.
Progress!
It turns out that from TextEdit a control click will offer Create Event [in Calendar.app] as the top choice. No need to use the Services Menu.
No such choice when control clicking in Safari, but you can choose New TextEdit Window Containing Selection. Then you can use the above.
With my own Keyboard Maestro Calendar event Macro, I start by selecting some text for the Calendar note, rather than the date so, I was thinking this would be the same. But makes sense the inbuilt context menu would act on a date.
Using the format (without the opening and closing quotes) in a TextEdit doc:
'# popclip
name: calendar
Icon: symbol:calendar
url: kmtrigger://macro=63AF5B8E-E09E-4AC5-A2F1-94E527E67BD5'
I was able to have the SF Symbols icon show in PopClip and trigger the KM macro using its URL as seen in the last line.
Just FYI, you can export a macro as a text service and it will appear in the Services contextual submenu with the text being passed in the TriggerValue token.
Although I noticed in my trials that while it works in most applications, if fails in Safari with some bogus "Not authorised to send Apple events to Keyboard Maestro Engine" error, probably related to Apple’s weird security settings and/or the weird way Safari web pages work.
Wow, I had no idea it was so easy to add a macro to the Services menu! (Who me read the Wiki???)
" Export as Text Service
The Export as Text Service command in the Export sub-menu in the File menu lets you save a Text Service that will trigger a macro when selected in the Services menu. The incoming text is available in the %TriggerValue% token."
The "incoming text" is for example...
[Brain racing and jumping over tall buildings in a single bound...]
Now, ("Give 'em an inch...") is there a way (not UI hacking) to have the action of selecting an item as a trigger open the Services contextual menu a la PopClip style? (How instant is the greed and will for more...)