Enter Key and Text Fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 23
- Joined: Wed Jul 09, 2014 2:35 pm
Enter Key and Text Fields
I am having a really frustrating time with the enter key. I know that when you use it in in a text field is sends the message enterInField instead of enter. I am working on the flashcard app in livecode university.
This is what I need to happen:
When finished typing the answer in the response field. Press Enter. When enter is pressed then run mouseUp in button CheckAnswer. Here is the code I have
on enterKey
send "mouseUp" to button "CheckAnswer"
end enterKey
How can I get this to run when pressing enter in a text field instead of enterInField?
I have already tried moving the code up the message hierarchy to a group, the card, and the stack. I have literally tried everything I can think of.
Thanks in advance!
This is what I need to happen:
When finished typing the answer in the response field. Press Enter. When enter is pressed then run mouseUp in button CheckAnswer. Here is the code I have
on enterKey
send "mouseUp" to button "CheckAnswer"
end enterKey
How can I get this to run when pressing enter in a text field instead of enterInField?
I have already tried moving the code up the message hierarchy to a group, the card, and the stack. I have literally tried everything I can think of.
Thanks in advance!
-
- Posts: 23
- Joined: Wed Jul 09, 2014 2:35 pm
Re: Enter Key and Text Fields
I think I have it now!
using
on returnInField
send "mouseUp" to button "CheckAnswer"
end returninField
seems to work!
using
on returnInField
send "mouseUp" to button "CheckAnswer"
end returninField
seems to work!

Re: Enter Key and Text Fields
Yep
ENTER <> RETURN!

ENTER <> RETURN!
Re: Enter Key and Text Fields
It sounds like you ran into the same issue I did a few months back. The "enter" key is the one to the right of the number pad, not the return. It threw me until I read a tiny note in the LC dictionary.starfirescully wrote:I think I have it now!
using
on returnInField
send "mouseUp" to button "CheckAnswer"
end returninField
seems to work!
Re: Enter Key and Text Fields
Get to know your hardware, guys! 

Re: Enter Key and Text Fields
Code: Select all
on returnInField
send "mouseUp" to button "CheckAnswer"
end returninField
on enterKey
returnInField
end enterKey
Simon
hey... who said that?

I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!