Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » "ENTER" key on Text?
"ENTER" key on Text? [message #373667] Tue, 16 September 2003 17:13 Go to next message
Judah Diament is currently offline Judah DiamentFriend
Messages: 14
Registered: July 2009
Junior Member
On a KeyEvent on a Text widget, how do I know if the key pressed was the
"ENTER" key? I don't see a constant for "ENTER" in SWT.

thanks!
-Judah
Re: "ENTER" key on Text? [message #373668 is a reply to message #373667] Tue, 16 September 2003 17:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bpasero.users.sourceforge.net

"SWT.CR" is the constant for the "ENTER"-Key
Ben

Judah Diament wrote:

> On a KeyEvent on a Text widget, how do I know if the key pressed was the
> "ENTER" key? I don't see a constant for "ENTER" in SWT.

> thanks!
> -Judah
Re: "ENTER" key on Text? [message #373670 is a reply to message #373668] Tue, 16 September 2003 18:35 Go to previous messageGo to next message
Judah Diament is currently offline Judah DiamentFriend
Messages: 14
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.
--------------030708060405040107050307
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

thx.

Benjamin P. wrote:

>"SWT.CR" is the constant for the "ENTER"-Key
>Ben
>
>Judah Diament wrote:
>
>
>
>>On a KeyEvent on a Text widget, how do I know if the key pressed was the
>>"ENTER" key? I don't see a constant for "ENTER" in SWT.
>>
>>
>
>
>
>>thanks!
>>-Judah
>>
>>
>
>
>
>


--------------030708060405040107050307
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;charset=ISO-8859-15">
<title></title>
</head>
<body>
thx.<br>
<br>
Benjamin P. wrote:<br>
<blockquote type="cite" cite="midbk7iif$1l8$1@eclipse.org">
<pre wrap="">"SWT.CR" is the constant for the "ENTER"-Key
Ben

Judah Diament wrote:

</pre>
<blockquote type="cite">
<pre wrap="">On a KeyEvent on a Text widget, how do I know if the key pressed was the
"ENTER" key? I don't see a constant for "ENTER" in SWT.
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">thanks!
-Judah
</pre>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
<br>
</body>
</html>

--------------030708060405040107050307--
Re: "ENTER" key on Text? - still not working [message #373679 is a reply to message #373668] Wed, 17 September 2003 00:30 Go to previous messageGo to next message
Judah Diament is currently offline Judah DiamentFriend
Messages: 14
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.
--------------040609010708040002080201
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

when I hit "enter", the line below is still false - any ideas? I am
running Eclipse 2.0.2 on Win2kK

if(e.keyCode == SWT.CR || e.keyCode == SWT.LF)


Benjamin P. wrote:

>"SWT.CR" is the constant for the "ENTER"-Key
>Ben
>
>Judah Diament wrote:
>
>
>
>>On a KeyEvent on a Text widget, how do I know if the key pressed was the
>>"ENTER" key? I don't see a constant for "ENTER" in SWT.
>>
>>
>
>
>
>>thanks!
>>-Judah
>>
>>
>
>
>
>


--------------040609010708040002080201
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;charset=ISO-8859-15">
<title></title>
</head>
<body>
when I hit "enter", the line below is still false - any ideas? I am
running Eclipse 2.0.2 on Win2kK<br>
<br>
if(e.keyCode == SWT.CR || e.keyCode == SWT.LF)<br>
<br>
<br>
Benjamin P. wrote:<br>
<blockquote type="cite" cite="midbk7iif$1l8$1@eclipse.org">
<pre wrap="">"SWT.CR" is the constant for the "ENTER"-Key
Ben

Judah Diament wrote:

</pre>
<blockquote type="cite">
<pre wrap="">On a KeyEvent on a Text widget, how do I know if the key pressed was the
"ENTER" key? I don't see a constant for "ENTER" in SWT.
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">thanks!
-Judah
</pre>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
<br>
</body>
</html>

--------------040609010708040002080201--
Re: "ENTER" key on Text? - still not working [message #373681 is a reply to message #373679] Wed, 17 September 2003 06:37 Go to previous messageGo to next message
Ralf Koban is currently offline Ralf KobanFriend
Messages: 319
Registered: July 2009
Senior Member
Hi Judah,

use

if (e.character == SWT.CR ...

Ralf

Judah Diament schrieb:
> when I hit "enter", the line below is still false - any ideas? I am
> running Eclipse 2.0.2 on Win2kK
>
> if(e.keyCode == SWT.CR || e.keyCode == SWT.LF)
>
>
> Benjamin P. wrote:
>
>> "SWT.CR" is the constant for the "ENTER"-Key
>> Ben
>>
>> Judah Diament wrote:
>>
>>
>>
>>> On a KeyEvent on a Text widget, how do I know if the key pressed was
>>> the "ENTER" key? I don't see a constant for "ENTER" in SWT.
>>>
>>
>>
>>
>>
>>> thanks!
>>> -Judah
>>>
>>
>>
>>
>>
>>
>
>
Re: "ENTER" key on Text? - still not working [message #373687 is a reply to message #373681] Wed, 17 September 2003 12:02 Go to previous messageGo to next message
Judah Diament is currently offline Judah DiamentFriend
Messages: 14
Registered: July 2009
Junior Member
thanks!

Ralf Koban wrote:

> Hi Judah,
>
> use
>
> if (e.character == SWT.CR ...
>
> Ralf
>
> Judah Diament schrieb:
>
>> when I hit "enter", the line below is still false - any ideas? I am
>> running Eclipse 2.0.2 on Win2kK
>>
>> if(e.keyCode == SWT.CR || e.keyCode == SWT.LF)
>>
>>
>> Benjamin P. wrote:
>>
>>> "SWT.CR" is the constant for the "ENTER"-Key
>>> Ben
>>>
>>> Judah Diament wrote:
>>>
>>>
>>>
>>>> On a KeyEvent on a Text widget, how do I know if the key pressed
>>>> was the "ENTER" key? I don't see a constant for "ENTER" in SWT.
>>>>
>>>
>>>
>>>
>>>
>>>
>>>> thanks!
>>>> -Judah
>>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
Re: "ENTER" key on Text? [message #373705 is a reply to message #373667] Wed, 17 September 2003 15:42 Go to previous message
Eclipse UserFriend
Originally posted by: steve_northover.ca.ibm.com

You should be using SWT.DefaultSelection instead.

"Judah Diament" <djudah@us.ibm.com> wrote in message
news:bk7gcp$ulp$1@eclipse.org...
> On a KeyEvent on a Text widget, how do I know if the key pressed was the
> "ENTER" key? I don't see a constant for "ENTER" in SWT.
>
> thanks!
> -Judah
>
Previous Topic:Problems with Activex and Word
Next Topic:busy indicator
Goto Forum:
  


Current Time: Fri Apr 26 08:04:07 GMT 2024

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

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

Back to the top