Modifying Shortcuts

In the left section of the window, the default shortcuts are categorized into groups. These groups can be expanded by clicking the arrow beside them to reveal the shortcuts.

The Preset Actions group, when expanded, reveals a shortcut configuration named PrintScreen which, when selected, reveals section on the right side, with three tabs:

The Comment Tab

The Comment tab allows you to describe how to use the shortcut, what it does, or anything else you might want to include.

The Trigger Tab

The Trigger tab contains the trigger configuration, which depends on the type of trigger specified:

Global (Keyboard) Shortcut

To modify a keyboard shortcut, click on the button that contains a wrench, and then enter the desired keyboard shortcut. To erase the shortcut, click on the button with the icon to the right of the change shortcut button.


The Trigger tab for a keyboard shortcut.

Modifying a trigger for a keyboard shortcut.


Window Action

Window actions contain several options:

Trigger When

This configures the particular window action that must occur for the shortcut to be triggered. The following options are available:

  • Window appears - Triggered when a window is opened.

  • Window disappears - Triggered when a window is closed.

  • Window gets focus - Triggered when you switch to a window.

  • Window loses focus - Triggered when you switch away from a window.

Window

This is where you define the actual window or windows the trigger applies to. For more information, see the section called “Defining Windows”

Mouse Gesture

A mouse gesture can be changed by clicking the Edit button below the area that displays the mouse gesture, which will open a window. Hold down the left mouse button and draw the desired mouse gesture in the area provided. The gesture will be saved when you release the left mouse button.


The Trigger tab for a mouse gesture shortcut.

Modifying a trigger for a mouse gesture.


The Action Tab

The Action tab is where you configure the action that will be performed when the shortcut is triggered. There are several types of actions that have different configuration options:

Command/URL

When using a Command or URL is a trigger, a text box is provided where you may enter the command to run or URL to open when the shortcut is triggered. You may also click the Browse button to the right of the text box to open a file selection dialog in which you can select a file on your local or a remote system.


The Action tab for a command.

Modifying a command action.


D-Bus Command

The following options are provided that allow you to specify a D-Bus method to be performed:

Remote application

The service name of the remote application the method is to be performed on, for instance org.kde.kate if you wanted to perform it on the Kate Advanced Text Editor.

Remote object

The path to the remote object the method is to be performed on, for instance /Document/1, if you wanted to perform it on the first document opened in Kate.

Function

The name of the D-Bus method to be called, for instance print if you wanted to print the document.

For more information on D-Bus, see the D-Bus Introduction on KDE TechBase.

Send Keyboard Input

At the top of the Action tab, there is a large text entry where you may enter the keystrokes you wish to be sent when the shortcut is triggered.

Most keys contain a single character, and to enter them here you just enter that character. For instance, to type an A, just enter A. Some keys have longer names, and you can also use those names. For instance, to press the Alt key, simply enter Alt.

Individual keystrokes should be separated by a colon (:). For instance, to type foo, enter F:O:O.

Keys that need to pressed at the same time should be separated by a plus sign. For instance, to press Ctrl+C, enter Ctrl+C.

Tip

Remember, you must enter keystrokes here exactly as you would on a keyboard. To capitalize letters, you must enter the Shift key. For instance, to type Hello, enter Shift+H:E:L:L:O.

This also applies to special characters. For instance, to type the at-sign on the U.S. English keyboard layout, enter Shift+2.

Warning

The action that is performed is dependent on the currently selected keyboard layout. If you change keyboard layouts and trigger a shortcut, it may have undesired consequences.

Beneath the keystroke entry text box, you may select which window the keystrokes will be directed to. You may choose from the following options:

  • Active window - The window that is currently open.

  • Specific window - The window that you describe using the form below. For more information on describing windows, see the section called “Defining Windows”.

  • Action window - When using the Window Actions trigger type, enter the keystrokes in the window that triggered the shortcut.


The Action tab for keyboard input.

Modifying the keyboard input action for a shortcut.