KDE Keybindings Standard

Introduction

The keybinding scheme presented below was deceided by the core developers at Kde-One. Discussion on how and if to use them will not be accepted.

Due to the fact that the Alt (or Meta) key is bound to the accelerator functionality we cannot use this key for shortcuts. Therefore the only legal key for standard shortcuts is the Control key. Allowing to use Alt for shortcuts also is a potential source of problems and will confuse novice users.

However, the good news is that the default keys are configurable. So users can configure the default keys to whatever they like. We will look forward to find a solution that allows interchangeable sets of keybindings, e.g. the set that uses Shift Ins/Del for cut & paste.

Due to the fact that the Qt shortcut mechanism in menus and thelike accepts only one key, multiple key bindings would have to be handled by the application programmer. It is therefore better to have exactly one key in order to ensure consistency.

Standard Keybindings

The following keys are the standard keybindings as they are included in the Kde distribution. Application programmers are not allowed to use these keys in their programs for other functionality than the listed one.

Key Binding Comment
Cut Ctrl-x Cut selected area and store it in the clipboa rd
Copy Ctrl-c Copy selected area into the clipboard
Paste Ctrl-v Paste contents of clipboard at mouse/cursor p osition
Undo Ctrl-z Undo last operation
Find Ctrl-f Find, search
ReplaceCtrl-r Find and replace matches
Ins Insert Toggle insert/overwrite with visual feedback (e.g. in the statusline)
Del Del Forward delete char at cursor position or del ete selected item(s)
BackspaceBackspaceBackwards delete char at cursor position< /tr>
Begin Ctrl-a Goto beginning of line
End Ctrl-e Goto end of line
All other Ctrl keys are free and can be used by the application prog rammer for custom purposes.

Standard Selection Rules

Application Interface

There is a simple to use set of methods in order to keep the additional work for application programmers as small as possible.

Reading a standard shortcut, e.g. the shortcut for the Copy key, is done with the statement kapp->key().cut().

Basically the class KKeyConf (see kkeyconf.h) is used. However, this class is a bit complicated, so an easy interface is provided. The class KApplic ation provides access to the key object of the type KShortcut that encapsu lates the functionality:

    class KShortcut: public KKeyConf
    {
      public:
        uint cut(void) const   { return readCurrentKey("Cut"); }
        uint copy(void) const  { return readCurrentKey("Copy"); }
        uint paste(void) const { return readCurrentKey("Paste"); }
        // ... and so on ...
    }
  

Send comments and questions to kde-look@kde. org (Subscribe to this mailing-list by sending an email with "subscribe" in the bo dy to kde-look-request@kde.org).
Stefan Taferner
Last modified: Wed Sep 3 20:32:46 MET DST 1997

mirror server hosted at Truenetwork, Russian Federation.