Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to bind different actions to F1-F4 depending on current editor
How to bind different actions to F1-F4 depending on current editor [message #440265] Mon, 28 November 2005 09:26 Go to next message
Eclipse UserFriend
Originally posted by: tomasz.luchowski.com

Hello all,

I am building data entry application and as such I need to use keyboard
shortcuts heavily. The problem is, I cannot exactly define actions and kind
keys to them, because the action to execute on key press depends on the
current editor opened. I use FormEditor, multi-page editor from Eclipse
Forms, for most data entry screens. Typically, F5-F9 are used to switch
between different pages of the current editor, and F2 used for "submit" and
F3 for "cancel".

I know that the standard way to use key shortcuts is to define actions, but
as the meaning of keyboard shortcuts is "current-editor-sensitive", I have
no idea how to go about it.

Can anyone give me any hints on how to approach this? I've tried to use
Display.getCurrent().addFilter(), but it didn't seem to catch any
keypresses.

Kind regards
Tomasz
Re: How to bind different actions to F1-F4 depending on current editor [message #440275 is a reply to message #440265] Mon, 28 November 2005 18:19 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
you want contexts, probably

see bindings from Douglas Pollock
http://www.magma.ca/~pollockd/despumate/bindingsHowTo.html

Tomasz Luchowski wrote:

> Hello all,
>
> I am building data entry application and as such I need to use keyboard
> shortcuts heavily. The problem is, I cannot exactly define actions and
> kind keys to them, because the action to execute on key press depends on
> the current editor opened. I use FormEditor, multi-page editor from
> Eclipse Forms, for most data entry screens. Typically, F5-F9 are used to
> switch between different pages of the current editor, and F2 used for
> "submit" and F3 for "cancel".
>
> I know that the standard way to use key shortcuts is to define actions,
> but as the meaning of keyboard shortcuts is "current-editor-sensitive", I
> have no idea how to go about it.
>
> Can anyone give me any hints on how to approach this? I've tried to use
> Display.getCurrent().addFilter(), but it didn't seem to catch any
> keypresses.
>
> Kind regards
> Tomasz
Previous Topic:RCP Webinar
Next Topic:where to hook in for a coolbar
Goto Forum:
  


Current Time: Mon Sep 23 09:08:19 GMT 2024

Powered by FUDForum. Page generated in 0.04006 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top