|
|
|
Re: Sending CTRL + F10 to a SWTBotEclipseEditor [message #20490 is a reply to message #20458] |
Fri, 06 February 2009 15:05 |
Joe Luebker Messages: 36 Registered: July 2009 |
Member |
|
|
Thanks, that was very close. I actually had to call:
notifyKeyboardEvent(SWT.CTRL, (char)0, SWT.F10); as '0' wasn't accepted
as a character.
I seem to be having issues interacting with the context menu that is
displayed after sending that keyboard event. I may post again about that
if I don't find a solution quickly.
Thanks again,
Joe
Ketan Padegaonkar wrote:
> Joe,
>
> Here's the event that's generated. Based on this I suppose you'll need
> to call: notifyKeyboardEvent(SWT.CTRL, 0, SWT.F10);
>
> protected Event keyEvent(int modificationKey, char c, int keyCode) {
> Event keyEvent = createEvent();
> keyEvent.stateMask = modificationKey;
> keyEvent.character = c;
> keyEvent.keyCode = keyCode;
> return keyEvent;
> }
>
> -- Ketan
>
> On 6/2/09 05:25, Joe Luebker wrote:
>> Hello,
>>
>> Is there a way to send a Ctrl + F10 keyboard event via a
>> SWTBotEclipseEditor? I see the notifyKeyboardEvent() methods but I do
>> not need to send a character which those methods require as an argument.
>> I only need to send a particular keyboard event.
>>
>> In my case I am actually trying to open the context menu of the vertical
>> ruler in a source editor.
>>
>> Thanks,
>> Joe
>
|
|
|
Powered by
FUDForum. Page generated in 0.03119 seconds