Autokey: Make Your Own Keyboard Shortcuts In Linux

Few days ago, we discussed the usefulness of Spark and how it enables you to create custom shortcut keys in Mac. Alternatively, in Windows, we can use the popular AutoHotKey to create custom shortcuts. So what about Linux? Autokey is probably the best answer.

AutoKey is a desktop automation utility for Linux and X11. It allows you to create scripts and assign hotkeys to these scripts, allowing you to execute them on demand in whatever program you are using.

Compatibility with various distro and keyboard layout

Personally I did not test it on all the Linux distro and all the different keyboard layout. However, according to the developer of Autokey:

The core part of AutoKey is sending and receiving keyboard events via the X server. It supports multiple X interfaces and should therefore be compatible with virtually any version of Linux running an X server. Full unicode support is provided and it should in theory work with any keyboard layout.

Theoretically, it should work for all Linux distros and keyboard layout.


(the following installation instruction is based on Ubuntu)

Open a terminal and type:

For Gnome user:

For KDE users:


Go to Applications -> Accessories -> Autokey.


You will see on the left pane two folders named My Phrases and Sample Scripts. The My Phrases folder is binded to the hotkey “Ctrl + F7“.

To get a feel of the capability of Autokey, open a text editor and press Ctrl + F7, you should see the context menu with Address option. When you select the Home address field, you should see the address pasted to the text editor.


Usage: creating your own hotkey

To create your own hotkey, go to File -> Create -> New Top Level Folder.


The Top Level Folder is the container for all your phrases and scripts. You can assign a hotkey to it and call it up in any applications. To assign a hotkey, simply highlight the TopLevel Folder entry and click the Set button beside the Hotkey option. You can then choose the modifier key (Ctrl, Shift, Alt or Super) and the shortcut key.


After creating the top level folder, the next thing is to create a phrase or a script.


The Phrase is a snippet of text that you use frequently. With a quick press of the shortcut key, you can quickly insert the phrase to the document that you are working at.

Go to File -> Create -> New Phrase. Enter the phrase content in the big text area and assign a shortcut key in the Hotkey option below.

Other than assigning hotkey, you can also use a abbreviation for the phrase. For example, I have set the abbreviation “mte” to the phrase “”. Now I just need to type “MTE” and it will automatically be replaced with the full URL.



For those who have knowledge of scripting, you can add your script, assign a hotkey and get it to run anywhere else. For those who know nuts about scripting, the “Record Marco” function can help you to record simple keyboard events.



For those who spend a lot of time on their keyboard, Autokey is a great tool to help you increase your productivity. The phrase feature improved your typing speed while the script feature help you to get more things done in shorter time. It might take some time to master the scripting, but once that is conquered, I am sure you won’t look back.

Have you tried Autokey? Let us know how did you make use of it to improve your productivity.

Image credit: bargainmoose


  1. Autokey looks very nice and versatile. KDE has great hotkey support built in, including for your own key combos and custom actions, but this could be a nice addition. So far I have all the shortcuts I need already though :D

    1. Autokey is most useful if you do a lot of typing. You can also get it to perform a series of tasks with a hotkey and that is the beauty of it.

Comments are closed.