KDE Logo
Guidelines
Basics
Menus
Toolbar
Statusbar
Content Area
Dialogs
Keys
Shortcuts
Cursor Keys
Selection
Dialog Navigation
Completion
Mouse
Drag and Drop

printable version (ps)/(pdf)
Links
Icon Style Guide
KDE User InterfaceStandards

Keys

KDE makes use of Accelerator keys and Shortcut keys.


Accelerators

An accelerator key is an alphanumeric key that can be pressed together with a Meta-key, usually Alt, to select an item which is visible on the screen. If an item has an accelerator key, this is shown by underlining that character. Note that an accelartor key is subject to translation: a French menu will have different accelerators from those of an English menu.

Example

In the following menu, Alt-P is an accelerator for the Paste item.

Undo Ctrl+Z
Redo Shift+Ctrl+Z

Cut Ctrl+X
Copy Ctrl+C
Paste Ctrl+V
Select All Ctrl+A

Find... Ctrl+F
Find Next F3
Replace... Ctrl+R

Application specific
entries
  



Shortcuts

A shortcut key is a combination of Ctrl and another key. When pressed together they start an action from any of the menus. In the menu, the shortcut is printed after each item so that the user can learn about the shortcuts by using the application.

Within an application a specific shortcut key will always start the same action. If the action is not possible within a certain context, no action will be taken.

Where possible, applications should try to use the same shortcut keys for the same actions. To make this easier, this style guide has defined a set of predefined shortcuts.

Please be aware that the user may configure these predefined shortcuts otherwise, on a system-wide basis.

Shortcut keys are not subject to translation: The shortcut for "Open a document" will be Ctrl-O in all languages, even if the menu-item doesn't contain an O at all in one language.

Example

In the following menu, Ctrl-V is a shortcut for the Paste item.

Undo Ctrl+Z
Redo Shift+Ctrl+Z

Cut Ctrl+X
Copy Ctrl+C
Paste Ctrl+V
Select All Ctrl+A

Find... Ctrl+F
Find Next F3
Replace... Ctrl+R

Application specific
entries
  
Implementation Note

Shortcuts and accelerators are often mixed up because Qt and KDE use the QAccel and KAccel classes to define SHORTCUTS!!.

No special classes are needed to define accelerators. An accelerator is created automatically by QLabel. The developer (or translator) can specify which key to use as accelerator by preceding this character in the label text with an ampersand (&).

Implementation Note

Do not hardcode shortcut keys - use the KStdAccel and its friends for defining them. That way, your application will stay consistent with other applications if the user decides to configure other keys as shortcut keys.

Previous Previous Next Next