Two options:
(See my blog for more details and screenshots for option 1)
First option (much simpler)
Upgrade to the python 3 port of autokey (because python 3 deals with unicode characters better than python 2)
For me, the installation worked as follows:
# Edit (April 2018). Autokey now uses python 3 by default. So try
pip3 install autokey
# Install the original autokey
sudo apt-get install autokey-gtk
# Update autokey to python 3 using pip3
pip3 install --user autokey-py3
Then make sure you run the python3 version, which is probably at
~/.local/bin/autokey-gtk
With this method, you can enter your unicode characters as phrases
Second option (if you can't get autokey-py3 to work)
Use a python script (File -> New -> Script) together with the system's clipboard
Paste the following into the script
import sys
reload(sys)
sys.setdefaultencoding('utf8')
from subprocess import Popen, PIPE
def paste_character(symbol):
c = Popen(['xclip', '-selection', 'clipboard'], stdin=PIPE)
c.communicate(symbol.encode('utf-8'))
keyboard.send_keys('<ctrl>+v')
paste_character('γ')
This works by changing the default python settings to work with unicode correctly. It then sends the chosen character to the clipboard (ensure you have xclip
installed). Here I've used γ as an example). Then it sends control+v to paste the character.
Extras for second option
The second method can be improved by taking all but the last line of the script and putting it in a file (lets call it MyCopy.py
). Then, in Autokey's preferences (Script Engine), tell Autokey where this file is. Then the script becomes
from MyCopy import paste_character
paste_character('γ')
Some applications don't use control+v for paste (eg terminal uses control+shift+v). But the character will still be on the clipboard.
Best Answer
The comment about the missing glyphs is correct.
I installed additional font packages, namely AR PL fonts Ukai & Uming:
and now I can get most (though not all) of the characters displayed correctly.
There maybe better font packages out there but that's the best answer I have come to the conclusion of at this time.