Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to send/emulate a key to a shell?
How to send/emulate a key to a shell? [message #462590] Fri, 14 October 2005 06:40 Go to next message
Eclipse UserFriend
Originally posted by: webapp.gmx.de

How can I send a key to a shell. In my special case I want to emulate that
the user pressed the esc-key, so that a Dialog will be closed.

Thanks, Rudolf
Re: How to send/emulate a key to a shell? [message #462599 is a reply to message #462590] Fri, 14 October 2005 14:45 Go to previous messageGo to next message
Douglas Pollock is currently offline Douglas PollockFriend
Messages: 84
Registered: July 2009
Member
Rudolf Schmidt wrote:
> How can I send a key to a shell. In my special case I want to emulate that
> the user pressed the esc-key, so that a Dialog will be closed.

Display.post(Event)

Remember to match every KeyDown with a KeyUp or things can become very weird
very quickly.



cheers,
d.
Re: How to send/emulate a key to a shell? [message #462638 is a reply to message #462599] Sat, 15 October 2005 21:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: webapp.gmx.de

Thanks for reply. Please give some more details, how do I get an event
instance?


"Douglas Pollock" <douglas.pollock@magma.ca> schrieb im Newsbeitrag
news:diog9k$egn$1@news.eclipse.org...
> Rudolf Schmidt wrote:
>> How can I send a key to a shell. In my special case I want to emulate
>> that
>> the user pressed the esc-key, so that a Dialog will be closed.
>
> Display.post(Event)
>
> Remember to match every KeyDown with a KeyUp or things can become very
> weird
> very quickly.
>
>
>
> cheers,
> d.
>
Re: How to send/emulate a key to a shell? [message #462640 is a reply to message #462638] Sun, 16 October 2005 02:42 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Rudolf,
see Snippet146 - post key event (i think that yo have to call
key down and key up, always)
If you want close Dialog only (and Dialog is jface Dialog) call
close.
Peco
Rudolf Schmidt wrote:

> Thanks for reply. Please give some more details, how do I get an event
> instance?
>
>
> "Douglas Pollock" <douglas.pollock@magma.ca> schrieb im Newsbeitrag
> news:diog9k$egn$1@news.eclipse.org...
>> Rudolf Schmidt wrote:
>>> How can I send a key to a shell. In my special case I want to emulate
>>> that
>>> the user pressed the esc-key, so that a Dialog will be closed.
>>
>> Display.post(Event)
>>
>> Remember to match every KeyDown with a KeyUp or things can become very
>> weird
>> very quickly.
>>
>>
>>
>> cheers,
>> d.
>>
Previous Topic:How do you export a standalone SWT executable?
Next Topic:tab between columns in a table tree
Goto Forum:
  


Current Time: Thu Mar 28 14:31:28 GMT 2024

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

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

Back to the top