Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to use a "thumbs up" unicode emoji in my communication.

Thumbs Up

Is there a simple way to do this without opening the Special Characters palette, such as some AppleScript? Some crazy unicode key sequence (I have looked into this one, and it seems too complicated, plus you have to change your keyboard layout)? A built-in utility for key shortcuts? A third party utility for key shortcuts?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

One of the easiest options would be to just use TextExpander. You can also configure abbreviations in a text file and then import it as a group.

It is also possible to add characters to the press and hold popovers.

I have used FastScripts to assign a shortcut to this script:

try
    set old to the clipboard as record
end try
try
    tell application "System Events"
        key code 123 using {option down, shift down}
        keystroke "c" using command down
    end tell
    delay 0.05
    set input to the clipboard
    if input contains return then error
    set p1 to read POSIX file "/Users/lauri/Notes/snippets.txt" as «class utf8» using delimiter linefeed
    set p2 to read POSIX file "/Users/lauri/Projects/unicode/html_entities.txt" as «class utf8» using delimiter linefeed
    repeat with p in p1 & p2
        considering case
            if p starts with (input & " ") then
                set the clipboard to text ((offset of space in p) + 1) thru -1 of p
                tell application "System Events" to keystroke "v" using command down
                delay 0.05
                exit repeat
            end if
        end considering
    end repeat
end try
try
    set the clipboard to old
end try

html_entities.txt is a list of abbreviations used for HTML character references.

You could also create ~/Library/KeyBindings/ and save a property list like this as DefaultKeyBinding.dict. After reopening applications, ⌥A should insert α. insertText: doesn't seem to work with U+10000 or characters above it though.

{
    "~a" = (insertText:, "α");
}
share|improve this answer
    
I went with the KeyBindings solution, as I'm already using that file to remap the Home and End keys. Thanks for your response. –  Matt M. Nov 5 '12 at 8:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.