Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Editor-specific Shortcut isn't recognized
Editor-specific Shortcut isn't recognized [message #543703] Wed, 30 June 2010 11:05 Go to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi,

I want to call a shortcut, that's bound to command shown in my contextmenue of my current editor.

I tried to trigger it by calling
KeyboardFactory.getSWTKeyboard().pressShortcut(SWT.SHIFT | SWT.CTRL, 'O');
(it's a Ctrl+Shift+O - organize imports in a xtexteditor).

This doesn't work.
I then tried to call another shortcut in my contextmenue, this doesn't work also.

General Shortcuts like Shift+Ctrl+R work this way.

What's the problem?

Regards
Markus
Re: Editor-specific Shortcut isn't recognized [message #543763 is a reply to message #543703] Wed, 30 June 2010 13:52 Go to previous message
Pascal G is currently offline Pascal GFriend
Messages: 157
Registered: July 2009
Senior Member
On 10-06-30 07:05 AM, Markus Oley wrote:
> Hi,
> I want to call a shortcut, that's bound to command shown in my
> contextmenue of my current editor.
> I tried to trigger it by calling
> KeyboardFactory.getSWTKeyboard().pressShortcut(SWT.SHIFT | SWT.CTRL, 'O');
> (it's a Ctrl+Shift+O - organize imports in a xtexteditor).
> This doesn't work. I then tried to call another shortcut in my
> contextmenue, this doesn't work also.
> General Shortcuts like Shift+Ctrl+R work this way.
> What's the problem?
>
> Regards
> Markus

Does your current editor has the focus (or keyboard focus) when you try
the shortcut?

That's probably the only thing I can see... otherwise, make sure it
really is working when you try it and that there isn't some fancy-weird
dependency that would prevent it from working (such as KeyBinding
conflicts).

Hope this helps.
--
Pascal Gélinas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/

*Because performance matters.*
Previous Topic:How to access a List
Next Topic:screenshots when running tests on headless server
Goto Forum:
  


Current Time: Thu Sep 19 06:52:21 GMT 2024

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

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

Back to the top