I have a text phrase (actually, several phases) that I use frequently in multiple applications. I'd like to create a keyboard shortcut or hotkey that will paste this text phrase wherever I have placed my cursor in a text input field (Apple Mail, Microsoft Word, TextEdit, TextWrangler, browser windows, etc.) rather than constantly copying and pasting from a sticky note.
Maybe I'm losing it, but I swear that on Mac Word 2008 I could apply my custom styles through a keyboard shortcut. It feels like it was probably shift+alt+s, and then type the name of my custom style.
I'd prefer not to have to buy any apps (seems like Keyboard Maestro has this functionality but seems silly to pay $36 just for this), though free apps would be fine. Tried looking under System Preferences > Keyboard > Keyboard Shortcuts but no obvious solution, and all AppleScripts I found seem to not translate properly for me. I've found other solutions for this problem on this forum for Windows users (like AutoHotKey) but none for Mac users.
Hennes- Once you’ve selected text, you might want to copy it so you can paste it and put the exact same word or phrase elsewhere. To copy text on a Mac. Command (⌘) + C. To copy text on a PC. Sometimes you’ll want to delete or cut a selection of text.
- By creating custom text shortcuts, you can type long expressions much easier with just a small short code that you can create to expand any longer phrase while typing.
6 Answers
The easiest way to type text with an AppleScript is to run:
You can trigger this with a keyboard shortcut by creating a new Quick Action (previously called Service) in Automator. Set it to receive No Input, and then drag Run AppleScript from the left pane to the right.
It should look like this:
Save it, and then assign a keyboard shortcut to this Service under System Preferences » Keyboard » Keyboard Shortcuts.
Mac Keyboard Shortcuts Cheat Sheet
slhckCustom Keyboard Shortcuts Mac For Frequently Typed Text Of The Other Side
slhckThe keystroke
command can only be used to insert characters that are found on the current keyboard layout, and there is a visible delay for long strings of text. You can also insert text directly:
That method isn't really usable either. There is a bug on 10.7 and 10.8 where the shortcuts for Automator services don't always work until you hover over the services menu.
I have used FastScripts to assign this script to F3:
snippets.txt look like this:
Another option is to use DefaultKeyBinding.dict. This would make ⌥M or ⌥X and m insert an email address:
You can also add custom text to the popovers shown when holding keys. See this question.
Have a look for an App called 'Textexpander' which gives you the abillity to define textphrases like @dd which - when typed - will be expandet to the defined content - in that case the actual date.
AFAIK it's Shareware. So it's not actually free but the demo mode is not timelimited.
Alfred app lets you do this—plus a great deal of other things—using the Workflow and Snippets features. I use Alfred all the time and highly recommend it. To unlock Workflows you have to pay for a Powerpack license, but you won't regret it. 😉
Just click on:System Preferences, Keyboard, Text, and enter your shortcut and phrase
A separate keyboard called the Martian Keyboard will hold text strings such as sentences and even short paragraphs.It will save you from typing annoying nuisance keystrokes you type over and over, day afterday. The keys are work like 'paste' keys.It has the ability to store all the shortcuts in Word on a single keyboard, using shift layer keys.It's mainly for professional use, so it is a bit expensive.
Not the answer you're looking for? Browse other questions tagged macoskeyboard-shortcutshotkeyscopy-paste or ask your own question.
It seems Apple added text expansion to iOS 5 and decided not to mention it. This is a great, highly-desired feature that can save you tons of time typing frequent phrases and long words. Here's how to set it up and the phrases you'll want to add right away.
How to Use Text Expansion to Save Yourself Hours of Typing Every Week
In a regular day, most of us type the same things over and over again, wasting an enormous amount…
Read more ReadAdvertisement
Set Up Text Expansion (Shortcuts)
First things first, let's get text expansion (or Shortcuts, as Apple calls it) set up. To get it set up, either watch the video up top or follow these steps:
- Open up the Settings app on your iPhone's home screen.
- Tap the General section.
- Tap the Keyboard section.
- Swipe down to the bottom and tap the button labeled 'Add New Shortcut...'
- Under 'Phrase' type the phrase you want the shortcut to expand to, and under 'Shortcut' type the shortcut you want to type instead. For example, if you wanted 'brb' to expand to 'be right back', you'd type 'brb' for the shortcut and 'be right back' for the phrase.
- Tap save when you're done.
You'll need to repeat this process for all the text expansion shortcuts you want to add. You can always delete them by swiping left over them on the keyboard settings page and tapping the delete button (much like anything else in iOS).
Advertisement
Phrases You Should Add Right Now
Here are some phrases you'll want to add to your iPhone right now. The nice thing about the feature is it works much like autocorrect, so you can set a text expansion shortcut to a portion of a word and it'll only expand if you type a space after the shortcut. For example, you could have a shortcut called 'sig' and type the word signature without worrying about the shortcut expanding when you don't want it to expand. This opens up plenty of simple shortcut options. Here are the ones we think everyone will find useful right away.
Advertisement
Note: These shortcuts shouldn't be added in uppercase (unless you want to), but are just shown that way to make them easier to read in this post.
- EML -> your@emailaddress.com, so you never need to type your email when sending a message to yourself or sharing it with someone else.
- PHN -> your phone number, so you can easily share your phone number without the need to type it or even remember it.
- ADDR -> your address, so you don't have to type out the entire thing.
- SIG -> your email signature, in case you only want to use it sometimes and not with every message.
- CTCL -> can't talk, I'll call you later, when you need to tell a friend you'll get back to them a bit later but aren't able to call (or answer their call).
- FMIN -> I'll be there in five minutes, for when you want to text someone that you're five minutes away but only have a few moments to type it.
- BRB -> be right back, for those of you who IM frequently on your iDevice.
- THX -> thanks!, is one example of many ways you can abbreviate common endings to messages.
Advertisement
Those are just a few handy ones you'll want to use right away. If you've got any of your own, share 'em in the comments!
Want to learn how to set up other neat features in iOS 5? Check out our other how-to guides.
Advertisement
How to Set Up and Configure All the New Features in iOS 5
iOS 5 is out and there are plenty of new features, some of which require a little bit of set up.…
Keyboard Shortcuts For Mac Computers
Read more ReadiOS 5: Hidden gems and features | Extreme Tech
You can follow Adam Dachis, the author of this post, on Twitter, Google+, and Facebook. Twitter's the best way to contact him, too.
Advertisement