Insert Any Special Character with a Single Keystroke

Have you ever tried to insert a special character such as the cent sign or the copyright symbol, only to realize that this key isn’t available on your normal keyboard?  Here’s how you can make an AutoHotkey script that will let you easily insert any character you want.

The Problem

Special characters can often be annoying to use.  There are many different ways to insert special characters, and many programs have specific ways to insert them.  For example, in Microsoft Word you can insert a special character from the Symbol button on the Insert tab in the ribbon.

image

Word also has specialized keyboard shortcuts for many of the common special characters.  For example, you can insert the Registered Trademark symbol ® by pressing Alt+Ctrl+R.

SNAGHTML24db69d

That’s a rather unwieldy shortcut, but it’s better than the default Windows shortcut for that symbol.  If you open the Character Map and select the Registered Trademark symbol, you’ll see that you could enter the ® symbol by pressing Alt+0174.  Now that’s a difficult shortcut to remember.

SNAGHTML25121cc

The Solution

Thanks to AutoHotkey, we can solve this problem and make our own keyboard shortcuts for our favorite symbols.  AutoHotkey is a great tool that we frequently mention here, but if you don’t already have it installed, download it at the link below and setup as normal.

image

Once AutoHotkey is running, you can right-click it’s icon in the tray and select Edit This Script to add your special character shortcut to your script.

image

Adding a Special Character Hotkey

Here’s what you need to enter in your AutoHotkey script to create a shortcut for your special character.  This will let you press Alt+ the character of your choice to enter a special character.  Substitute your_hotkey with the character you want to use as your shortcut, and your_special_character with the special character you want to input.:

!your_hotkey::
{
SendInput {your_special_character}
}
return

To find the special character you need to enter, open the Character Map in Windows, find the character, and then select Copy.  Now paste this instead of Your_special_character.

image

For Example, we want to enter the degrees symbol by pressing Alt+o.  So, we entered the following in AutoHotkey:

!o::
{
SendInput {°}
}
return

Press Save in Notepad, and then reload the AutoHotkey script from the taskbar.

image

Now, we can simply press Alt+o to enter °.  Entering the temperature just got easier!

You can substitute ! for ^ if you’d like to use Ctrl instead of Alt for your shortcuts.  Note also that many programs have keyboard shortcuts using Ctrl and Alt, and even many default Windows shortcuts such as Cut and Paste use Ctrl, so make sure to not make a shortcut that overrides these.

Here’s some scripts for common special characters we wanted to use this with.  Note that you can have as many of these in one script file as you like.

Cent:

Euro:

Registered Trademark:

Copyright:

ñ:

!c::
{
SendInput {¢}
}
return
!e::
{
SendInput {€}
}
return
!r::
{
SendInput {®}
}
return
!p::
{
SendInput {©}
}
return
!n::
{
SendInput {ñ}
}
return

Conclusion

Whether you’re trying to enter a character from another language or simply need to make sure you show that your product name is copyrighted every time you right it, this simple trick will help you find and enter what you need quicker.  Although it may take a minute to setup, once it’s done you can simply leave it and just remember your new shortcut.  If you find that your shortcut interacts with another program, you can also easily change it anytime.

Link

Download AutoHotkey

Matthew digs up tasty bytes about Windows, Virtualization, and the cloud, and serves them up for all to enjoy!

  • Published 07/6/10
More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!