Is there a way to add AWT listener to a SWT component?
I previously made an app running mostly in AWT and Swing components. Now, I have hotkeys function which is dependent on a custom-made library that listens to global key events and returns its corresponding AWT key code.
My problem arises when I shifted the whole app and used SWT components instead. As we know some of the keys returns a different key code now, which messes up the whole hotkeys function.
The initial solutions I've thought of are:
A. Use javax.swing.jtextfield as mycomponent listener instead of swt.widget.text
B. Add AWT listener to SWT component (if possible)
C. Create a class which re-maps all AWT keycodes to SWT and vice-versa.
I believe these are feasible solutions. I just want to check out with you guys if you have a brilliant idea on which I could work with. I'm only new to java and I could use some professional insights on this.
(besides, I think A is cheating. B I could not find a way to do yet. And C is a hassle job to do)
Cheers.