KHotKeys consists of two programs : KHotKeys itself and configuration program. To run it, select System/KHotKeys. To configure the running program, select Settings/Keys/KHotKeys.
In the configuration window, on the left is a list of all actions. At the bottom are global settings and button for creating and deleting actions. On the right there are settings for the selected action :
Whatever you want :) ( well, there are some exceptions ... ).
The command or macro you wish to be executed when the hotkey is pressed. The first one is for shell commands, the second one for any URL's ( such as '/usr/src/linux', '/files/pictures/pic01.jpg', '/root/program.kdelnk' - note that a .kdelnk file is also considered to be URL ) and the third one is for macros.
Press the 'Hotkey' button to change the hotkey assigned to the action. Only one command or URL can be assigned to each hotkey. There can be one or more macros assigned to each hotkey, but a macro and a command ( or URL ) can't be assigned to the same hotkey.
When the hotkey is pressed and there is a window with WM_COMMAND property ( it's usually equal to the command or it's empty ) equal to this field, or it matches the regular expression, the command won't be executed and only the found window will be activated.
When the hotkey is pressed and there is a window with WM_NAME property equal to this field, or it matches the regular expression, the command won't be executed and only the found window will be activated.
When the hotkey is pressed and there is a window with WM_CLASS property ( window class is usually same for all windows of that application and is different for each application ) equal to this field, or it matches the regular expression, the command won't be executed and only the found window will be activated.
If you don't want to execute the command or URL if the application is already running, use at least one of the three above described options ( or use Autodetect ) and this combo will get enabled.
If the first option is selected and any window matching the given criteria is found, it will be activated and the command or URL won't be executed.
The difference between the first and second option is that the second one waits for any window matching the criteria being created by the command or URL.
The third option is similar to the first one, but it activates the last active matching window ( the first one will keep switching to the same window until it's closed ).
Press this button after you've entered the command or URL and it will execute the command or URL. Watch for all windows created and their properties being printed. Pick the window that belongs to the command ( usually only one window will be displayed ) and press 'Select window'. 'Window command', 'Window title' and 'Window class' will be set to values obtained from the picked window. ( Also don't forget to quit the running application started by the autodetection, it won't be terminated automaticaly ).
Let's you select the file to run.
When the hotkey is pressed and there is a window with WM_COMMAND property ( it's usually equal to the command or it's empty ) equal to this field, or it matches the regular expression, the macro will be executed.
When the hotkey is pressed and there is a window with WM_NAME property equal to this field, or it matches the regular expression, the macro will be executed.
When the hotkey is pressed and there is a window with WM_CLASS property ( window class is usually same for all windows of that application and is different for each application ) equal to this field, or it matches the regular expression, the command will be executed.
If none of the three options is used, macro will be executed everytime the hotkey is pressed.
Press this button to find out the three above options. The macro won't be executed. Switch to the window in which you want the macro to be executed. Watch for the properties of these windows being printed. Pick the window that you want and press 'Select window'. 'Window command', 'Window title' and 'Window class' will be set to values obtained from the picked window.
Press these to create a new action, delete an action and make a copy of the currently selected action.
When you select for a command 'Search only for windows created by this command', KHotKeys will wait for the window. This is the timeout for the waiting in milliseconds.
Pressing this hotkey will make waiting for the window timeout immediately.