Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Making handleKeyDown public

​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 <fabiofz@xxxxxxxxx> 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


Back to the top