In this post, I talk about one of my favorite utilities I use regularly – AutoKey. AutoKey is a real life saver and a great productivity boost for me. There are not much articles about AutoKey and even those few cover very few of its features. I intend to talk about some of my favorite features which I use regularly. I use AutoKey’s GTK version in Ubuntu but most of the points in the post will be applicable to other Linux variants and KDE.
What is AutoKey
AutoKey’s homepage describes it concisely as : "AutoKey is a desktop automation utility for Linux and X11. It allows the automation of virtually any task by responding to typed abbreviations and hotkeys. It offers a full-featured GUI that makes it highly accessible for novices, as well as a scripting interface offering the full flexibility and power of the Python language.".
If you have used AutoHotKey in Windows, then you will be immediately comfortable in AutoKey. (If not, you should check it out !) . AutoKey uses Python as the scripting language instead of AutoHotKey’s custom scripting language. But the potential and functionality are very similar.
AutoKey can be used in multiple scenarios :
a) Text Substitution : Replace a short abbreviation with a long expansion. Eg adr with your full address.
b) Hotkeys : If you are a keyboard person like me, use it open various program. For eg I use windows+c for opening chrome, windows+g to open gedit etc. Alternatively, you can make AutoKey "send" hotkeys to the applications. (Eg make it press ctrl+s automatically).
c) Automation : AutoKey supports Python scripts and has a very useful API’s to control windows, clipboard and mouse. So you can use it to automate any thing you can imagine !
The biggest advantage of AutoKey is that it works across all applications. So I can add a keyword which expands to a code snippet and use it in multiple applications – say in vim and also in gedit without any extra work.
Installation
You can read all about the utility at AutoKey’s homepage. The Google code page is the recent (and active) one even though most links in net points to a sourceforge page.
There are many ways to install AutoKey and it depends on your OS. For Ubuntu, the easiest way is to install using the update manager. I would suggest using the update manager as it will install the dependencies automatically. If you want to be in the latest code then the best solution is to add AutoKey PPA to your system. Instructions for adding the PPA is in the linked page. I would recommend getting the latest version (0.70) as it has lot of new features and some important bug fixes. Of course, if you use any other Linux variant, you can always install from AutoKey’s source at the download page.
Starting AutoKey
You can start AutoKey in Ubuntu by Applications -> Accessories -> AutoKey. Or in command line (for GTK) as /usr/bin/autokey-gtk. Once it is started , you will see an blue icon with "A" in the tray.
Once you start using AutoKey , you will prefer to start it when the system starts. For Ubuntu (GTK) AutoKey, System -> Preferences -> Startup Applications , enter "/usr/bin/autokey-gtk" as an additional startup entry. Note : AutoKey also has an option in its preference to start automatically but it did not work for me.
Some Basics
AutoKey appears in the tray as a blue colored icon with "A" in it. Most of the time, it runs passively , reading your keystrokes. Right click on the icon and make sure that the checkbox "Enable Expansions" is checked. Only then AutoKey will perform the expansions. To make any changes, you need to access its configuration dialog box. To get it , right click on the AutoKey icon and select "Configure".
The configure window will look like this.
AutoKey Usage : Phrases
Phrases are the easiest way to start with AutoKey. You can consider this feature as a powerful text expansion. For eg you can enter the string "adr" and get it expanded to your whole address.
Phrases : Example 1
Lets take a simple example. Whenever I type the string "akr" , I want it to expand to "Auto key rocks !" . To get this , open the AutoKey config editor. Create a new phrase by File -> Create -> New Phrase (Or Ctrl + N) . Give the phrase a valid name. (Eg AutoKey). In the phrase box (the large text box – which is actually an editor !) , type "Auto Key Rocks !". In the "Phrase Settings" section, click on the "Set" button near "Abbreviation". Type the abbreviation as "akr" . Your screen will look like the image at the bottom. Click "OK" and click on "Save" button. Congrats , you have created your first phrase.
Lets now test it out. Open gedit (or kate or some editor) and type akr. Watch it expand to "Auto key rocks !". Now try it in vim. Try it in Firefox. Try it in Open Office. Watch it work at all the places.
Phrases : Example 2
Now let us make it slightly more complex. Lets say we want a tab in between each word. (Auto Key Rocks ! ). To do that, select the phrase you just created. In the editor box, type the following. "Auto<tab>Key<tab>Rocks<tab>!" . Thats right. When AutoKey sees <tab> it expands it to the actual tab character. Now save the phrase again and try it .
Tab is not the only hotkey that AutoKey supports. It supports virtually all the special keys in the keyboard. You can get all of them at AutoKey’s Hotkey’s page .
Phrases : Example 3
Another of my favorite feature is "Match phrase case to typed abbreviation" . To try it out, give "Auto Key Rocks !" (ie remove those tabs) in the editor box. Click on "Set" button of "Abbreviation" . Select the checkbox “Match phrase case to typed abbreviation". The next checkbox "Ignore case of typed abbreviation" should be automatically become checked. If not check it. Save the phrase. The dialog must look like the image below.
Now experiment with various ways of typing the abbreviation.
"akr" auto key rocks !
"Akr" Auto key rocks !
"AKr" Auto Key Rocks !
"AKR" AUTO KEY ROCKS !
Phrases : Example 4
Another thing to try is to give hotkey to the phrase. Of course, it does not make much sense for this small phrase. If you have a large paragraph and want it copied in a single command , then hotkey is the way to go. Again , hotkeys are very useful when using Scripts. (Which I will discuss shortly)
Before setting a hotkey, the usual caveats apply – make sure it does not clash with other applications’ functionality (Eg ctrl+s for expanding phrases is a bad idea !) . Also if you are using Hotkeys make sure it is memorable.
As a simple example, lets make "Auto key rocks" when we press ctrl+alt+q. To do that , click "Set" near "Hotkey". You will get a dialog. Click on "ctrl" , "alt". Now to set "Q" , click on "Press to set" and type "Q". Press "Ok" and save the phrase. Your screen will look the image below . Now type "ctrl+alt+q" in any application and watch it become "Auto key rocks !".
Phrases : Example 5
Let us suppose you want your abbreviation to work only in one application. This can be achieved using "Window Filter". Let us take an example. You want akr to be expanded in Gedit only. Notice that any document (new or existing) opened in Gedit ends with the word gedit. We will use that as our filter. To achieve that , select the phrase and click on "Set" near "Window Filter". Enter ".*gedit" as the filter. There are two things to note here .
a) The filter is actually a regular expression which has lot of expressive power.
b) The regular expression must match the whole window name. Just having "gedit" will not match a gedit window.
Phrases : Example 6
One of the common ways I use Phrase is to expand code snippets. For eg when I type cppincs , then I automatically the following snippet. It works whether in vim or in gedit. (If you use primarily vim, then checkout vim plugins like snippetsEmu or snipMate ).
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>using namespace std;
int main()
{
return 0;
}
Phrases : Example 7
You can use AutoKey to enter username and password automatically. A simple example is to have a phrase like “username<tab>password<enter>”.
Misc Phrases Features
There are some other options in Phrases menu. These features are applicable to scripts also.
a) "Always Prompt before pasting this phrase" – If checked, when you type the abbreviation , you will see a confirm from AutoKey. Only when you confirm it will be expanded. I doubt , you will ever select it.
b) Show in Tray menu : If you select this option, your phrase will be visible when you right click on the AutoKey icon. I guess , this will be useful when you dont assign an abbreviation or hotkey for a phrase. But again, why will you ever do that ?
Misc Abbreviation Features
When you click on "Set" near "Abbreviation" you will see lot of options. Again, the same description applies to scripts also.
a) Remove typed abbreviation : It is usually checked. This means you are actually asking for a text substitution. ie "akr" becomes "Auto key rocks !" . If you uncheck it, then "akr" becomes "akrAuto Key Rocks !".
b) Omit trigger character : Typically the phrase is expanded when you type a space or press enter. If you select this option, they will be ignored.
c) We already discussed "Match phrase case to typed abbreviation" and "Ignore case of typed abbreviation" in Example 3.
d) "Trigger when typed as part of word" and "Trigger immediately" : These two work in conjunction. If both are checked, the abbreviation is expanded immediately without waiting for space or enter.
AutoKey Usage : Scripts
Scripts are the coolest feature in AutoKey. AutoKey uses Python as the scripting language for automation. If you don’t know Python, you should really learn it ! AutoKey has an excellent set of API to make your code a breeze. Scripts come into play when you want to do more complex things than simple substitution. Examples include : bringing the current time in the document automatically, adding selected word automatically to Google calendar etc. In fact you can even show some rudimentary GUI to user. Most of the features in scripts are similar to phrase features.
Scripts : Example 1
This example is from AutoKey’s sample scripts page. Lets say you want to bring the current date and time whenever you typed the word "date" in any application. File -> Create -> New Script (or Ctrl + Shift + n) . You will be see a editor with full Python code highlighting. Enter the following script
output = system.exec_command("date")
keyboard.send_keys(output)
The screen should look like this :
Note that in this case, system was already imported. If you want to use some other package, you might want to import it first. Give "date" as the abbreviation. Save the script and type "date" in any application and watch it magically become current time (Eg Wed Apr 14 21:14:27 CDT 2010 ) . Of course, you can have a hotkey assigned for the script too !
Scripts : Example 2
One of my favorite way of using AutoKey is to use it as a way to invoke applications. I am more of a keyboard person and like to do everything without touching the mouse. For eg , when I press "super+c" , Chrome gets started. Lets try it now.
In a new script , press the following code and assign "super+c" as the hotkey. Super is nothing but the windows key on the keyboard. After saving it , when you press "windows(super) + c" , Chrome starts !
import subprocess
subprocess.Popen(["/usr/bin/google-chrome"])
You can note that there are two ways of invoking commands. "system" is the old way of invoking it. It works well when you want to wait for the output of the command. "subprocess" is much more flexible. I have used "Popen" which is typically used to start a program and you want to wait for it to end.
Scripts : Example 3
Alternatively, you might want to use AutoKey to open some folders or files based on a hotkey. Eg open your "Ubuntu One" folder with a hotkey or open some excel sheet. A generic way (Obtained from the discussion here ) is given below. xdg-open intelligently, opens the file/folder using the appropriate viewer/program.
import subprocess
subprocess.call([‘xdg-open’, ‘PATH_TO_FILE_OR_DIR’])
Scripts : Example 4
There are lot of interesting ways to use the full power of Python. Some clever usage can be seen at Favorite scripts 1 , and Favorite scripts 2 .
Scripts : Example 5
AutoKey has a powerful API to control windows, clipboard, mouse etc. For eg, you make a particular window come to foreground (see window.activate) , get the selected text, get contents of clipboard, add a text to clipboard etc. You can check the AutoKey API reference. You can also check out some sample scripts .
Another neat feature is to provide a lib folder and AutoKey will import all files in that folder. I have not tried this feature, but I think it should work. To get that Edit -> Preferences -> Script Engine.
Folders
AutoKey uses folders to organize the phrases and scripts. You can either create a new top level folder or some nested folders. This concept is quite easy to use. I group the phrases and scripts based on their functionality and intent. You can use any organization that works for you.
Trays
The concept of tray is another useful feature – Although, I rarely use it. There are two ways to add a phrase or script to the tray. First is to add the phrase/script within the "Tray Phrases" folder. Other way is to check the checkbox "Show in tray menu" (for both phrase and script). In both the scenarios, when you right click on the AutoKey icon, you will see them. My guess is that this will be useful if you did not set a hotkey or abbreviation.
Preferences
AutoKey has a intuitive preferences menu. Common things to do are :
a) Enable "Prompt for unsaved changes" checkbox in "General" tab. If unchecked, the phrase/script changes are automatically saved.
b) Also check "Enable undo by pressing backspace". This means when you want to type a text which is a abbreviation (eg akr) without getting expanded, then you type the string,let it expand and press the backspace immediately. It will give the abbreviation without the expansion.
c) Another thing to change is default hotkey to get AutoKey’s config window. It is usually ctrl+k which interferes with Firefox’s search button.
d) Check out other options and enable as you feel fit.
Miscellaneous Stuff
1. Autokey works by catching you keystrokes and doing the expansion or script execution. This has many implications which you will notice when you use AutoKey a lot. For eg when you copy paste a text with an abbreviation , it will not expand as you did not "type" it. Similarly you can cause a abbreviation to be not expanded if you use your left/right keys. Of course, using backspace within an abbreviation still results in proper expansion.
2. Previous versions of AutoKey had a nifty hotkey called cursor which will place the cursor at that position. It is not supported. For a workaround , see this Ubuntu forums thread. To give it here ,
firstPart = "First part of the text. Cursor ->"
secondPart = "<- second part"
keyboard.send_keys(firstPart + secondPart)
keyboard.send_key("<left>", len(secondPart))
3. If you want to see all the AutoKey topics and responses , check out their mailing list topics.
4. AutoKey now uses a json file for configuration. It is located at ~/.config/AutoKey/AutoKey.json. Enjoy playing with it ! This also means that if you want to use the same settings across users , just create a symlink to the same file. If you want to share across multiple machines use Dropbox or Ubuntu One. For more details, check this AutoKey thread.
5. If you face any issues when using it, follow the instructions at the Troubleshooting page before shooting a mail. That said, I have to say that AutoKey mailing list is very active and helpful !
6. This is a post from LifeHacker on snippits , another tool similar to AutoKey. I would not recommend it (as I had a hard time even installing it). But the point is , you should be able to use most of the things done in the video and more using AutoKey. Use that video as an exercise for testing your AutoKey skills 🙂
7. There is another project called IronAHK that is going on which brings AHK to Linux. It is not yet ready for prime time. If you are a AutoHotKey user , may be you will find it useful.
Good Discussions In AutoKey’s Mailing List
I notice that AutoKey’s mailing list occasionally bring up some creative way of using AutoKey. I hope to keep this section as a live one which catalogs the discussions that bring out a new facet of AutoKey. .
1. Can I exclude windows in Window Filter?
Yes. See here .
2. How to get a script to invoke an abbreviation ?
See here .
3. Restrictions in using modules in AutoKey scripts :
Acknowledgements
I have liberally used resources from AutoKey’s wiki pages and its mailing list. I learned lot of very interesting points from AutoKey’s mailing list. I have linked to some of them and given the essential point of the thread in some places. If you are using AutoKey , then you must join the list. It is a very helpful and active list.
In conclusion , AutoKey is a very neat utility . Clever use of it will tremendously improve your productivity. I hope this post helped to use it better ! Have fun with AutoKey !
Update [04-15-2010]: Corrected a mistake pointed out by Chris. If “Prompt for unsaved changes” checkbox is unchecked, changes are saved automatically. You don’t lose the changes as I wrote.
Nice article…I like the text abbreviation utility vim too… just use :ab vsk Sureshkumar Varadarajan, it would fill out my name if i just type vsk. pretty cool feature to use for creating function structure or for loop structure when coding…i love that…
Good point!
Vim has powerful features like ab, autocmd and vim plugins (like snipmate or snippetsemu) which can provide most of AutoKey’s functionality – but only to vim. I guess the primary advantage of Autokey is that it allows those abbreviations across applications. I heavily use those advanced features in vim but using the snippets as autokey phrases ensure that it works in all applications – vim,gedit , emacs or eclipse . I kinda alluded to it in phrases : example 6 🙂
Again , if you primarily use vim , i would suggest snipmate or snippetsEmu as they have quite flexible and powerful file based expansion which are scriptable too !
[…] Anleitung von Saravanan Thirumuruganathan […]
Hi Saravanan,
Phrases : Example 7 : The given link is not working
suresh
Hello Suresh,
thanks for pointing out. Looks like the blog is deleted. The phrase was basically username “tab” password and “enter”. I will update the post soon !
Sir,
Thank you for demystifying Autokey so well. It is indeed a most useful utility, andyour explanations are simple and useful. Mu Ubuntu experience will be certainly enhanced and enriched by this.
Arvind
Thanks Arvind for the kind words !
Hi Saravanan,
i’m new in using this little program, but i have one question.
i’m from croatia, and our language have some specialcharacters like ŠĐČĆŽ. (i hope that webpage will show them correctly). but, when i add new abr for my address, and i make all of up written (enter full address in editor window), after saving phrase, and go to test it, those special characters are missing. so, instead ĆČĐŠŽ i have blank space. is there any way to show them?
thanks in advance!
regards!
vanja
Hello Vanja,
Since I primarily use US keyboard layout, I do not have much experience in other special characters. The best place to search is Autokey’s google groups page at http://groups.google.com/group/autokey-users .
I found the following two threads might be of use for you : http://groups.google.com/group/autokey-users/browse_thread/thread/ab748ac3994be8d9/8fd9f0e0aae38a7e
and
http://groups.google.com/group/autokey-users/browse_thread/thread/e83635e5e30b27ea/eb99141634786071
Hope they point you in the right direction !
Alternatively, you can join the google group and shoot a mail to the list about your issues – some one might have face the same issue and solved it !
Hi Saravanan,
unforutunatelly, i saw all of those sites, and no concrete answer. at least something that maybe solve my problem.
but, thanks any way!
keep good work!
regards!
vanja
Hi Vanja,
In this case, I would suggest you to email Autokey’s mailing list. The users in mailing list might have additional insights !
i posted similar question to autokey issues, but there, also, no thing concrete. so, as i said, or use it without speciall characters or add them manually.
hello vanja,
sorry that it did not pan out well. I would suggest you to play around with the following options – One of them might work out for you :
a) Autokey config window -> Edit ->Preferences -> Interfaces
b) For any phrases, there is a field called “Paste Using” – try out different values in it – For me , usually “Clipboard ctrl+v” works best.
Also try changing you keyboard layout if that does any help.
Hey although it does look like a great tool, it won’t work for me.
if I create a Phrase or a Script, they only work by right clicking on the tray icon and clicking on the name of it.
The abbreviations shortcuts don’t do anyrhing at all and the hotkeys can’t be configured…
Can you help me?
Hello Darragh,
You can check out the following :
a) Right click on AutoKey icon and verify if the “Enable Explansions” checkbox is on.
b) Play around with different interfaces in Settings->Advanced Settings->Device Interface .
c) Some times the abbreviations do not work immediately – so try it a few times.
If none of them work, then quit Autokey and start it from terminal using autokey-gtk -l (GNOME) or autokey-qt -l (KDE). Try the scenarios and collect the log files and email them to the autokey mailing list specified in the post. Hopefully some one will be able to diagnose the issue.
I have a challenge for Autokey. Can anyone tell me if this is feasible? From Firefox I want to go to my banks page either via a bookmark or auto typing the address into the address bar. Then wait until the page has loaded then click on the login button, wait, then enter ID number, tab to password, enter that and then click on login. Is this doable or must I break it down into smaller chunks?
Thanks for any help.
Hi Alan,
It is certainly possible to have a script like that. Here is a sample script :
Caveats :
a) This assumes firefox is already running. Alternatively, you can use subprocess module to start it always
b) It waits for 5 seconds to allow page the load.
c) Replace username and password with your actual code.
Oops! WordPress munges some of the keycodes used and the indentation.
The words ctrl, tab and enter should be replaced with the hotkeys specified in Autokey hotkey page
Thanks for the reply but now I have another problem. When I go to set the key combination, eg super key and “a” I click on the super key tab but when I click on the “a” key it locks up and I have to kill the process to regain control. I have tried several combinations of shift, alt, ctrl and all do this. After doing this a couple of times my system becomes very unstable and will lock solid requiring a hard reset. My setup: 10.04 64bit 2.6.32.24-generic, GNOME 2.30.2 on a Acer Travelmate 6410 2gb RAM
Thanks for any further help.
Alan, I am not sure what exactly is the problem here as I have not faced it before. You can check the troubleshooting page at http://code.google.com/p/autokey/wiki/Troubleshooting for instructions to get debugging information. If you mail the problem and the logs to autokey mailing list, I am sure that someone will be able to find the issue.
Thanks you for this brilliant tutorial. Keep up the good work! 🙂
Good work, this helped me alot. Until now the only utility I have missed from Windows world is Texter, but at last I found AutoKey:) Yeah!
[…] have as many keyboard shortcuts as possible – I used a variety of tools for this end ranging from Autokey, GNOME-Do etc. Specifically, I was using AutoKey for many of keyboard shortcuts to invoke […]
[…] autoKey: to avoid typing frequently encountered words (tutorial) […]
[…] autoKey: to avoid typing frequently encountered words (tutorial) […]
I need tutorial on IRonAHK.Because the autokey script is not working on IronAHK.But IronAhk we dont have any doc’s or tutorial.
Prabhu,
IronAHK and Autokey are two very different projects. IronAHK is based on AutoHotKey in windows for which there are a huge number of tutorials/documentation.
Hot stuff. Thanks for this!
Is there a way that I can include a smiley face as the expansion? Say I type smile- and autokey then substitutes the colourful one? For example, in MS Word or or LibreOffice if I type sign= it would substitute formatted text, and pictures (of my signature).
Example 3: is there a way that one can change the default to tick the currently unticked box?
scripts:
Your example 2: could I also add anything to make it open Chrome in say Workspace 10?
Example 4: what happens if I have already assigned hot keys using “settings / keyboard shortcuts?” Which has precedence?
Is there any way I could build a file of replacements to import into AK? e.g. have table that has 5 columns:
col1: the group (e.g. \My Abbrev\Business
col2: the name
col3: the abbreviation
col4: the hotkey
col5: the phrase / substitution
New at this, but getting there.
Still having issues with scripting, I want to be able to use a hot key to save a copy of whatever i am in (text/image) to a pre arranged folder location.
Could someone help.
Thank You
@Anonymous,
I do not think that may be very straightforward. It is always possible to save the clipboard contents to a file. But finding the current window and the application and then finding the appropriate file might be a bit hard. Can you give a specific example of what you want to achieve? May be there is some solution to the simpler problem.
Hi. Can you explain why Autokey text substitution does not seem to work with GNOME-DO? I mean no text substitution takes place at all if the text is entered in the GNOME DO interface. I think there are other apps as well that displays this characteristic, but I cannot remember what they are offhand.
Max
Max,
Yes. It does not work when typed in gnome do interface. I suspect that is because gnome-do by itself “swallows” or processes the keyboard inputs without providing it to other handlers.
Thanks for recommending this and for sharing the helpful examples.
The main reason I need this app right now is to automatically insert a short piece of text which includes italics, superscript, and two unicode characters.
Any ideas? Even if it could just insert the unicode automatically that would be a great timesaver.
Here’s the kind of text I’m dealing with: –
Pparβ/δ–/–
Inserting this manually, everything before the en dashes are italicized, the en dashes and beta/ delta symbols are inserted with the unicode symbols in ubuntu (ctrl-shift-u +code), and the en-dashes are superscripted. Any tips would be much appreciated….
Combo,
I would suggest trying keyboard.send_keys function of AutoKey. The entire list is given at http://code.google.com/p/autokey/wiki/SpecialKeys . For eg,
keyboard.send_keys(“++u + code”)
To italicise, you might want to use the function to select text and then use ctri+i for the italicizing. Eg
keyboard.send_keys(“Ppar”)
#Select the word Ppar
keyboard.send_keys(“”, len(“Ppar”))
keyboard.send_keys(“”)
keyboard.send_keys(“”,len(“Ppar”))
#italicize it
keyboard.send_keys(“+i”)
Hope it helps.
Hi,
I using Autohotkey for quite some time and was looking for its counterpart for linux. I basically connect to a linux server through VNC and I was looking for a autohotkey like thing to do some automation there. As you mentioned in your article, autokey can help me in this regard.
The linux version on the server is 2.6.18-194.el5 and I am using KDE environment.
Can autokey version present on autokey website be installed on this or is it can only be installed on Ubuntu.
Thanks a lot in advance,
Best Regards,
Sanjay
Sanjay,
Autokey works on any flavor of linux. You can install the version in the website and it work without issues. Let me know if you need any other information.
Hi Saravanan,
Thanks a lot for your reply. The linux machine that I am working on is part of LSF and is administrator controlled. Is there anyway by which a compiled .exe file is available which can be run directly to for Autokey.
Thanks and Best Regards,
Sanjay
Sanjay,
You can get the source from http://code.google.com/p/autokey/downloads/list , extract it and run the command python setup.py install –prefix=some path . You can set any folder you have access to in the –prefix option. Hope this helps.
Saravanan,
I have got autokey installed on a RedHat linux machine. I am getting the following error in running:
–> /usr/bin/autokey-gtk
Traceback (most recent call last):
File “/usr/bin/autokey-gtk”, line 20, in ?
from autokey.gtkapp import Application
File “/usr/lib/python2.4/site-packages/autokey/gtkapp.py”, line 22, in ?
import gettext, gtk, dbus, dbus.service, dbus.mainloop.glib
ImportError: No module named mainloop.glib
Exit 1
Also, what are the option displayed by the command below. From where can I get some help about these options.
–> /usr/bin/autokey-run
usage: autokey-run -[s|p|f] [name]
Exit 1.
Thanks a lot for all your help,
Best Regards,
Sanjay
Sanjay,
I think you do not have “dbus-python” installed. Installing it should fix the problem. Also there has been lot of changes in autokey recently. So please try with the latest version (and autokey-qt) 🙂
It’s very promising and I hope they keep up the development as it has a long long way to go before it is as good as AutoHotkey on the windows platform, the only program I really miss now I use Linux
“b) Show in Tray menu : If you select this option, your phrase will be visible when you right click on the AutoKey icon. I guess , this will be useful when you dont assign an abbreviation or hotkey for a phrase. But again, why will you ever do that ?”
I guess it is for mouse-only operation! 🙂
Good article! Is there a way to “import” so to speak a two column list of abbreviations and their expansions without having to add them one by one?
[…] https://saravananthirumuruganathan.wordpress.com/2010/04/14/autokey-linux-utility-for-text-substituti… […]
Hi. Can someone make a script that copies the selected text from a document and search it on google ? It would be very helpful to me because I make subtitles and often search unknown words online. Thank you.
We use Initials and date at work for notation purposes. After much trial and error i finally made this work to Print MB 3/13 (press tab then enter)
a = “MB ”
b = system.exec_command(“date +%m/%d”)
keyboard.send_keys(a + b + “” + “”)
figured it’s worth sharing
[…] AutoKey : Linux Utility for Text Substitution , Hotkeys and Desktop Automation (excellent tutorial) […]
Before finding AutoKey, I was doing such scripts manually using the autopy Python library (http://www.autopy.org/). I only mention it for completeness. With autopy you can also move the mouse, perform a click, insert a text, etc. AutoKey is easier to use but you should know about autopy too 🙂
Thanks Jabba. I took a look and it seems nifty – especially the screen capture.
[…] http://saravananthirumuruganathan.wo…op-automation/ […]
[…] http://saravananthirumuruganathan.wo…op-automation/ […]
[…] autoKey: to avoid typing frequently encountered words (tutorial) […]
please help me..
i want to use enter for change application (Ctrl + Alt + Tab). What should i do with my auto key?
thanks a lot