[PATCH] Shortcuts schemes for KDE application

Alexander Dymo dymo at ukrpost.ua
Mon Apr 14 17:30:51 BST 2008


Hey,
I've implemented basic shortcuts schemes support for XMLGUI-based KDE
applications.
With this patch, for example, you can define your own shortcut schemes
for Kate. Say, you can have an "emacs" scheme and "vi" scheme and so
on. For KDevelop this will solve the long standing problem of shortcut
clashes with kate part.

This works like this.
You can have shortcut schemes installed in additional xmlgui files
called <xmlguiclientname><schemename>shortcutsui.rc (for instance,
katepartmyschemeui.rc)
which only contain xml with action properties:

 <ActionProperties scheme="myscheme" >
  <Action shortcut="Ctrl+W" name="add_toolview" />
 </ActionProperties>

The same action properties may be saved into the user configuration in
<app>ui.rc.

The shortcuts dialog has the "details" button with schemes
configuration. It's enabled for all KDE apps now, but if that's not
interesting for all apps, it's easy to provide an api to enable it for
each individual application.

Please take a look. I'd appreciate any feedback because we (KDevelop
team) would really like something like shortcut schemes in kdelibs. We
discussed this approach during our meeting yesterday and agreed that
shortcut schemes would be the great solution for us because we do want
to ship custom shortcut schemes.

PS: I have the screencast recorded to demonstrate how it works and
I'll post it in several hours.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shortcuts_patches.patch.bz2
Type: application/x-bzip2
Size: 5107 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080414/bb447193/attachment.bin>


More information about the kde-core-devel mailing list