Making handleKeyDown public

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Making handleKeyDown public

Fabio Zadrozny
Hi SWT devs,

I'm currently on the process of taking a stab at the bug related to macro recording: 


So, while at it, one stumbling block is that I found no good way for programatically replaying a key stroke to a StyledText:

There's Display.post(Event), but it's not very reliable (i.e.: if you have 2 workspaces and you switch focus, events start to go to the one that got focus on playback) and I can't really force it to target a StyledText, so, it's a no-go for a reliable macro engine.

By looking at the code, handleKeyDown does exactly what I want, so, I'd like to check if it'd be possible to make this a public API (although I'd be happy if someone can point me to a different solution to accurately and reliably replay a key event).

Thanks,

Fabio

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Making handleKeyDown public

Fabio Zadrozny
​Just saw that org.eclipse.swt.widgets.Widget.notifyListeners(int, Event) can already be used to post events to a StyledText in the way that I want, so, no API change is needed for my use case already.

Thanks,

Fabio​

On Sun, Jan 15, 2017 at 10:26 AM, Fabio Zadrozny <[hidden email]> wrote:
Hi SWT devs,

I'm currently on the process of taking a stab at the bug related to macro recording: 


So, while at it, one stumbling block is that I found no good way for programatically replaying a key stroke to a StyledText:

There's Display.post(Event), but it's not very reliable (i.e.: if you have 2 workspaces and you switch focus, events start to go to the one that got focus on playback) and I can't really force it to target a StyledText, so, it's a no-go for a reliable macro engine.

By looking at the code, handleKeyDown does exactly what I want, so, I'd like to check if it'd be possible to make this a public API (although I'd be happy if someone can point me to a different solution to accurately and reliably replay a key event).

Thanks,

Fabio


_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Loading...