getCommonKeyHandler [message #124543] |
Fri, 26 March 2004 11:02  |
Eclipse User |
|
|
|
Originally posted by: celine.mortelette.atosorigin.com
Hello,
I have two custom actions in my gef editor ACTION1 and ACTION2.
I have added this in my getCommonKeyHandler method, in my gef editor :
sharedKeyHandler.put(
KeyStroke.getPressed( 'G', 0, SWT.CTRL ),
getActionRegistry().getAction(ACTION1));
sharedKeyHandler.put(
KeyStroke.getPressed( 'H', 0, SWT.CTRL ),
getActionRegistry().getAction(ACTION2));
It does'nt work, but when I do this, it works :
sharedKeyHandler.put(
KeyStroke.getPressed( SWT.F4, 0),
getActionRegistry().getAction(ACTION1));
sharedKeyHandler.put(
KeyStroke.getPressed( SWT.F5, 0),
getActionRegistry().getAction(ACTION2));
What is my mistake in the first code ??
Thanks for your help
C
|
|
|
|
|
Re: getCommonKeyHandler [message #125197 is a reply to message #125027] |
Wed, 31 March 2004 11:25  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
> Thanks Randy but my problem is not resolved !
> When I put a breakpoint to see what is generated, for 'G' I can't see the
I think CTRL+G is the "bell" key. You can change the way CHARs are
displayed in the debugger to display HEX values.
> value of the "character" field, for 'J' I see "\n" and for 'C' no event is
J is the 13th letter, ASCII 13 is newline.
CTRL+C is being consumed by the copy keybinding in the eclipse IDE, so you
won't receive that key.
> generated .....
> I have three different results depending on the pressed character.
> What can I do ?!
>
>
> "Randy Hudson" <none@us.ibm.com> a
|
|
|
Powered by
FUDForum. Page generated in 0.04830 seconds