Active1 month ago
Creating keyboard shortcuts and sending keystrokes are of the most basic functions of AHK. So, assigning Ctrl+P to photos is as simple as: ^p:: Send, photos return Which translates to: If P is pressed while Ctrl is down, simulate the following keystrokes: p, h, o, t, o, ands. TextExpander saves your fingers and your keyboard, expanding custom keyboard shortcuts into frequently-used text and pictures.Type more with less effort! Here are a few examples for what you can do with TextExpander: Insert standard greetings, phrases, boilerplate paragraphs, and signatures – including formatted text and pictures.
![Keyboard Keyboard](/uploads/1/2/6/5/126594769/953416221.png)
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.
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.
Hennes60k77 gold badges9494 silver badges144144 bronze badges
RuthieRuthie
6 Answers
The easiest way to type text with an AppleScript is to run:
Mac Keyboard Shortcuts For Windows
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 desktop computers.
slhckslhck171k4949 gold badges476476 silver badges492492 bronze badges
The
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:
![Custom keyboard shortcuts mac for frequently typed text owl Custom keyboard shortcuts mac for frequently typed text owl](/uploads/1/2/6/5/126594769/829839526.jpeg)
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.
Community♦
LriLri32.6k55 gold badges9595 silver badges135135 bronze badges
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.
heiglandreasheiglandreas
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. ? Convert ink to text onenote for mac.
mklbtzmklbtz
Just click on:System Preferences, Keyboard, Text, and enter your shortcut and phrase
Jonathan HuieJonathan Huie
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.
RickRick