Xhotkeys - Hotkeys for the X-Window

Requeriments

You need the following components to run Xhotkeys:

- X-Window System (XFree86 or Xorg)
- Python 2.3
- Python-Xlib 0.12
- Python-GTK 2.4

Setup

You have to configure your destkop environment to run Xhotkeys at startup. For example, with GNOME you will do:

- System-> Preferences -> Sessions
- StartUp Programs -> Add
- StartUp Command: xhotkeys (order: 50)

And restart the session.

Configuration

To configure the hotkeys, run xhotkeys --config:

Here you can add new entries, delete them or edit the existing ones. Configuration will be saved on exit. On Edit hotkey window you must fill the name and command entries (hotkey may remain disabled). While you are recording a key you can abort pressing Esc. To disable the hotkey for the entry, just press BackSpace.

You can also use mouse buttons. You will see that these special keys are recorded as Button1, Button2, Button3., and so on. Commands are run though the default shell (normally, bash), which is useful for many reasons:

Xhotkeys uses a configuration file for each user which is saved at $HOME/.xhotkeys. If you open it with a text editor, you'll see that it's simple to modify manually.

Example: a Babylon-like launcher

For those who were used to Microsoft Windows, probably they miss nice applications as Babylon (I did!): you know, simply pressing a Control + mouse button you got the definition (or translation) of the word where the cursor was, no need to select it. Wonderful, but in GNU/Linux we can put several apps to work collaborative, and achieve similar or better results.

First of all, install the xsel, dillo and xautomation debian packages, and write a bash script like this (copy it to /usr/local/bin). Now configure xhotkeys to launch whatever you want:

#.xhotkeys: xhotkeys configuration file

definition=<control>Button3:gnome-dictionary $(getdclick)
translate=<control><shift>Button3:dillo "www.wordreference.com/es/translation.asp?tranword=$(getdclick)"

Great! isn't it?



Last modified: Sun Feb 25 10:50:26 CET 2007