Is there a way to create a simple keyboard shortcut for DATE?

In previous Mac OS versions, I was able to press "Command D" on my keyboard to enter 'today's Date' into a text field (in Pages, Contact notes, Mail, etc). Unfortunately, that keyboard shortcut no longer works and I am unable to figure out how to create it in Apple's new Keyboard Shortcut in System Settings (despite carefully reading all instructions). It appears that now, a keyboard shortcut can only be created for something that already exists in the Menu bar.


When I press "Command D", I want today's date to be entered (I do not want to create a Duplicate file)


Thanks for any guidance.


PS. While I'd prefer to stay within Apple's eco system, I'd also consider buying a 3rd Party App. to perform this very simple task.

iMac (M1, 2021)

Posted on Dec 24, 2023 7:47 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 24, 2023 3:16 PM

If you don't find the fix for your problem you might try using a macro app. I use Keyboard Maestro for that and many, many more quick inserts of pre determined text, changing settings in apps and launching apps or documents.


KM may be overkill for just entering the current date but there are many macro app on the App Store from free to …… that should be able to do the job. Just search for "macro".


Using a macro app the shortcut would be available for all apps that take text.



14 replies
Question marked as Top-ranking reply

Dec 24, 2023 3:16 PM in response to larrybobba

If you don't find the fix for your problem you might try using a macro app. I use Keyboard Maestro for that and many, many more quick inserts of pre determined text, changing settings in apps and launching apps or documents.


KM may be overkill for just entering the current date but there are many macro app on the App Store from free to …… that should be able to do the job. Just search for "macro".


Using a macro app the shortcut would be available for all apps that take text.



Dec 25, 2023 2:23 PM in response to larrybobba

Below is text I copy/pasted from an Apple tutorial regarding shortcuts.

"You can create keyboard shortcuts only for existing menu commands."
Imo, this is an unfortunate change made by Apple.

To my knowledge, it's never been any different. You can create keyboard shortcuts for Automator Quick Actions (née Services) and now Shortcuts. A Quick Action is likely what you used before as there was no command to enter the Date in the OS--maybe in an app. Pages has a Date & Time command that you could create a keyboard shortcut, but it outputs a full date string and doesn't have any customizations.


Searching back in time, I don't find any reference to a built-in function, but Devon Technologies had a suite of Word Services that could insert the date in various formats. Since it was a Service, you could create a keyboard shortcut for it.

They are available for free, here: https://www.devontechnologies.com/support/download

You must move the apps to the Applications folder for them to work.

Dec 24, 2023 8:36 AM in response to larrybobba

That command+D keyboard shortcut may be reserved in certain applications such as the Finder, or Pages, and you cannot change that because applications have event listeners for certain keystrokes and those applications will intercept command+D for their own purposes, not for your goal of current date insertion.


You need a unique keyboard shortcut that achieves your goal without conflicting with already assigned keyboard shortcuts in Apple's Finder or other applications. Then, you need to determine the current date format that you want inserted, and the approach to do that. You don't need a third-party application for this purpose. Just a Quick Action or if on macOS Monterey or later, a Shortcut app.


What version of macOS do you have installed from Apple menu () : About This Mac, and what date format string do you want inserted?

Dec 26, 2023 10:38 AM in response to Barney-15E

Thank you Barney. Your screen shot helped a lot.


I created a Quick Action to enter the date as desired. Just one more question, if I may......


My new Quick Action works as desired in Contacts (notes) and in Pages. However it does NOT work in Mail. I've tried to figure out how to get it to work in Mail but I'm stumped.


How do I get this Quick Action to work in Mail?


Thanks for your help.

Dec 26, 2023 2:00 PM in response to Barney-15E

Barney,


I have successfully created a new Keyboard Shortcut in the Shortcuts app. Thank you for your help.

In Contacts and Pages, it responds as desired.......when I enter keyboard strokes which I placed in 'Run with' when I created the Shortcut, today's date is entered correctly.


Oddly, that same method does not work in the Mail app, despite the fact that the Shortcut appears in the Services menu in Mail (the same as it does in Contacts and Pages).

I can select the Shortcut I created in the Services menu and the date appears in Mail. But it does not appear when I use the keyboard strokes.


Is there possibly some setting that I unknowingly have set incorrectly in the Mail app which causes it to not recognize the Keyboard?

Dec 26, 2023 2:32 PM in response to larrybobba

As with the first time you asked, I don't know why it doesn't work for you in Mail.

In the history of Services, there was a time where you had to select it once from the Services menu, then the shortcut worked thereafter. I haven't seen that problem since the advent of Shortcuts.


If you added the part about copying to the clipboard, try pasting just to see if it has run correctly and just didn't have a place to paste. If you can paste it into something after running it in Mail, then it is running, but doesn't seem to think there is a place to put it. You do have a new message open with the cursor in a text field (body).


Having thought about this a few moments more, did you choose a shortcut that is not in use by Mail?


Dec 27, 2023 7:39 AM in response to Barney-15E

I used control+D as my Keyboard Shortcut to 'Enter Date'.


(oddly, my Shortcut set-up would not accept option+command+D as it did in your previous screenshot. When I entered option+command+D it would not accept it in the field, instead my Dock just disappeared/reappeared)


My newly created Shortcut works as desired in all apps except Mail. When in Mail, I can choose the 'Enter Date' command from the services menu and the date is entered into the text field as desired. (but the Keyboard command+D does not result in the date being entered). The Keyboard shortcut DOES work in Contacts>notes which is where I use it the most frequently. I also tried the clipboard suggestion, but nothing changed.


Finally, I did look at the various Mail menu commands and I did not see control+D.


Barney, you've helped me a lot and I appreciate your time. I can get along just fine with the progress I've made on this.


THANK YOU.



Dec 27, 2023 7:46 AM in response to larrybobba

You don't need to keep repeating yourself. The history is displayed in the thread.

I changed mine to ctrl-D and it works in the To field, but not the body. Quite strange.

Using Ctrl-D in the Body and trying to pasted does not work. I have the shortcut set to appear in the menu bar. Running it from there and then pasting in the body works.

Try some other shortcut combinations.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Is there a way to create a simple keyboard shortcut for DATE?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.