shortcut for text string

I would like to program a keyboard shortcut to type a certain text string (like a sequence of 5 digits) in any program, and I'm having trouble figuring out a way to do it on Mac. For example, is there a way for me tap F6 and have "93052" be typed?

MacBook Air 13″, macOS 10.14

Posted on Jun 30, 2023 3:47 AM

Reply
6 replies

Jun 30, 2023 4:45 AM in response to Trina527

Hello Trina527,


To my knowledge, I don't think you can replace the function of existing keys. You can change what they do.. For example, you could change Show Spotlight search (Command + Space) to another keyboard combination, maybe (Command + "). I could be wrong, but I believe that's it.


You can do text replacements, but this would try to autocorrect everywhere.


  1. Open Settings
  2. Scroll down and click Keyboard
  3. Click Text Replacements


If these numbers have a specific meaning or abbreviation you could use that as the key (replace) and the number as the value (with).


Example:

Replace: EmpID

With: 93052


Now whenever you type EmpID (Employee ID), the keyboard would suggest changing it to 93052. Please keep in mind these should sync across all of your Apple devices, so it would appear on iPhone and in other applications as well. Not just certain programs.


Whatever program you're using might have shortcut options that support this feature.

Jul 3, 2023 4:10 AM in response to VikingOSX

Thanks for your questions. The numeric string is constant. I'd like to be able to press one key instead of five, and also to be less likely to make an error than by manually typing it each time. I tried to achieve this with a small external macro keyboard, but it turned out that the "Text Strings" function wasn't compatible with Mac OS.

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.

shortcut for text string

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