I have a problem with Autokey: I can't copy-paste through it a special Unicode character. Here is an example:
I am French, and in French writing, you use a space before a semi-colon. But in formal typography, you don't use a regular space before a semi-colon but a ‘narrow no-break space’ which is the Unicode character U+202F.
So when I am writing formal things in French, instead of always wasting time typing CTRL+Shift+U+202F
+ENTER+;+space', I would like to use an Autokey new phrase. Using the abbreviation Space+;;
(which means, verbally, typing space, then semi-colon twice). Which means when I type (anywhere) space+;;
, autokey transforms it into ;
(which is a narrow no-break space followed by a semi-colon).
BUT the problem here is this: when I create a new phrase in Autokey with ;
, then when I use the abbreviation, Autokey replaces it only with ;
, erasing the narrow no-break space. And it appears it does this with any other too-special Unicode character...
Does anyone have an idea of how to get round this issue?
Thanks a million!
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:
Then make sure you run the python3 version, which is probably at
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
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 becomesSome applications don't use control+v for paste (eg terminal uses control+shift+v). But the character will still be on the clipboard.
Works for me in Linuxmint 19.3, which runs python 3.6.8.
BUT doesn't work for me in Linuxmint 20.0, either as python 3.6.8 or 3.8.5. Repeatedly get this script error:
Script name 'amacron'
Traceback (most recent call last);
===
amacron script: