Wednesday, December 14, 2016

how do I create word/sentence keyboard shortcuts


Is there a way to create either word or sentence (or both) keyboard shortcuts so that when you want to type a word, you can just do the shortcut and it pastes it into wherever you're typing? The idea is to be able to have shortcuts to paste boilerplate words or sentences into whatever application I'm typing in.


For example, my dad has trouble typing and say he typically types the word "photos" a lot. Is there a way to make it so that when he wants to type "photos", he can just do like Ctrl+P or some other shortcut so that "photos" is pasted into wherever he is typing?


This is not a question about MS Word or any text editing application, just in general. But if there are ways to customize MS Word or other apps, it would be nice to know how to do it :)


Answer



As Oliver implied, you can use AutoHotkey. 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.



Note that you can send uppercase letters without explicitly sending a preceding Shift key:


Send, PHOTOS

is equivalent to


Send, {Shift Down}photos{Shift Up}

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...