How to configure keyboard shortcuts for special characters on OS X?
Solution 1
Create ~/Library/KeyBindings/
and save a property list like this as DefaultKeyBinding.dict
:
{
"~c" = (insertText:, "©");
}
Applying changes requires reopening applications. The custom keybindings don't work in all applications or views, but they do seem to work in Sublime Text 2.
For more information, see hcs.harvard.edu/~jrus/Site/Cocoa%20Text%20System.html and osxnotes.net/keybindings.html.
You could also make a custom keyboard layout with Ukelele or create a private.xml
in KeyRemap4MacBook.
Solution 2
To type © on a Mac, it's Alt+g
To configure keyboard shortcuts for special characters on OS X:
System Preferences > Language & Text > Text > Symbol & Text substitution. Use the + on the bottom of the list to add the ones you want.
EDIT 08/19/12:
According to http://www.macworld.com/article/1160500/text_substitutions.html, you can make Text Substitution
universal in Macs by executing the command in Terminal
:
defaults write -g WebAutomaticTextReplacementEnabled -bool true
Solution 3
Another method is to trick your computer into auto-correcting some string of text to the symbol of your choice.
For example, typing theta
changes to θ
To do this on Mavericks go to: System Preferences > Keyboard > Text
Related videos on Youtube
MaiaVictor
Updated on September 18, 2022Comments
-
MaiaVictor almost 2 years
How to configure keyboard shortcuts for special character on OS X? For example, one would set ALT+C to ©.
-
JW. over 10 yearsThis question: apple.stackexchange.com/q/49565/73607 on the Apple SA is similar, and has some nice answers.
-
-
superuser almost 12 yearsI have made an edit to the answer, hope this helps.
-
MaiaVictor almost 12 yearsSymbol & Text substitution is not working for my editor, sublime.
-
superuser almost 12 yearsI'm not familiar with Sublime, but I found this article which might help in your case: macworld.com/article/1160500/text_substitutions.html
-
Admin almost 12 years@superuser, that link contains some nice info. Please add the
defaults write
and Edit > Substitutions to your answer. -
brevno almost 12 yearsThe defaults command does the same thing as the checkbox in the Language & Text preference pane.
-
boulder_ruby over 10 yearsThis answer is no longer timely for Mavericks. Your menu options listed here do not exist now
-
paulmelnikow about 9 yearsIn Mavericks, it's Keyboard > Text.
-
P A N over 8 years@´ This gives me a syntax error when trying to source the file:
DefaultKeyBinding.dict: line 2: syntax error near unexpected token `('