Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] On disabling standard commands

Custom Key Bindings How To

To help other people finding this thread save the time we have put
into this topic, here's a quick summary of the current state of
affairs. Please go to the wiki for the most complete and up to date
information and additional details.

http://wiki.eclipse.org/Riena_Key_Bindings

Summary

Riena 1.2 will use it's own scheme by default. This means than at the
beginning only the key bindings defined by Riena are available. This
excludes all standard 'eclipse' key bindings typically available in an
RCP application -- which may or may not be useful for Riena (Ctrl+F6,
Ctrl+F7, Ctrl+3).

To add more key bindings to your app, you should define your own
'scheme' and define all your key bindings there. By using the optional
attribute parentId, you choose to inherit the default key bindings
from Riena. You can still overwrite anything you don't like (or omit
it, to get rid of them).

<extension
         point="org.eclipse.ui.bindings">
      <scheme
            id="my.key.bindings"
            name="My Key Bindings"
            parentId="org.eclipse.riena.ui.defaultBindings">
      </scheme>
      <key
            commandId="org.eclipse.riena.example.client.exitCommand"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="my.key.bindings"
            sequence="F10">
      </key>

In your SwtApplication subclass, you have to implement protected
String getKeyScheme() { return "my.scheme.id.goes.here" } to make your
scheme the default one.

Kind regards,
Elias.

-- 
Elias Volanakis | Technical Lead | EclipseSource Portland
elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | http://eclipsesource.com


Back to the top