Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » replicating SWING/AWT keyPressed and keyTyped events
replicating SWING/AWT keyPressed and keyTyped events [message #439985] Tue, 20 July 2004 04:24 Go to next message
Eclipse UserFriend
Originally posted by: news.vadalus.com

Hi All,

Can someone tell me what is the best way of replicating the behaviour of
the SWING/AWT keyPressed and keyTyped events? (SWT only having the more
sensible keyPressed and keyReleased) I have some code I am converting
over from swing and it has quite a complicated set of interactions with
these events. It would be simpler just to replicate them I think.

I think I can replicate this by just have keypressed being called twice
whenever I press a key, one where keyTyped is fired and a subsequent one
where keyPressed is fired. Complexities arise though as I need to be
able to consume the event (e.doit = false) separately for each event.

Any help would be appreciated!

L
Re: replicating SWING/AWT keyPressed and keyTyped events [message #440003 is a reply to message #439985] Tue, 20 July 2004 13:10 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
I suggest you rewrite the code. There isn't a simple mapping.

"vadalus" <news@vadalus.com> wrote in message
news:cdi6ns$co2$1@eclipse.org...
> Hi All,
>
> Can someone tell me what is the best way of replicating the behaviour of
> the SWING/AWT keyPressed and keyTyped events? (SWT only having the more
> sensible keyPressed and keyReleased) I have some code I am converting
> over from swing and it has quite a complicated set of interactions with
> these events. It would be simpler just to replicate them I think.
>
> I think I can replicate this by just have keypressed being called twice
> whenever I press a key, one where keyTyped is fired and a subsequent one
> where keyPressed is fired. Complexities arise though as I need to be
> able to consume the event (e.doit = false) separately for each event.
>
> Any help would be appreciated!
>
> L
Previous Topic:Tab Order
Next Topic:Table row Striket hrough line
Goto Forum:
  


Current Time: Thu Apr 25 01:47:51 GMT 2024

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

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

Back to the top