[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: overriding ctrl-N key binding

Mykola Nikishov wrote:
>> How do I go about over riding ctrl-N global key binding?
>> In my RCP, to override text editor key bindings, I defined a new
>> scope. But that does not seem to work for the global context.
>> Are there any alternatives?

One way to do it would be to do the following:

      <key
            sequence="M1+N"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
      <key
            commandId="org.eclipse.ui.newWizard"
            sequence="YOUR BINDING"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />

Another would be to define a new scheme as described in:
     http://www.magma.ca/~pollockd/despumate/bindingsHowTo.html


> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg06094.html
> AFAIK you must meet the following  conditions:
>- org.eclipse.ui.actionSets/actionSet/action@definitionId has
>  corresponding org.eclipse.ui.bindings/key@commandId;

yes.

>- org.eclipse.ui.bindings/key@schemeId has corresponding
>  org.eclipse.ui.commands/keyConfiguration@id 

yes.  but in a less deprecated way, org.eclipse.ui.bindings/scheme@id


>- org.eclipse.ui.commands/keyConfiguration defined and specified as
>  value of property org.eclipse.ui/KEY_CONFIGURATION_ID in
>  plugin_customization.ini

yes, but again, org.eclipse.ui.bindings/scheme.  Though the property in the
ini file remains the same "org.eclipse.ui/KEY_CONFIGURATION_ID".



cheers,
d.