Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
problème
- Posts: 77
- Joined: Fri Oct 23, 2015 12:03 am
Post
by problème » Mon Nov 23, 2015 4:28 pm
Hello,
when i press the enter key nothing happen in my message box
Code: Select all
on enterKey
put "Enter key pressed"
end enterKey
I have liveCode 7.1.0 | Build 10043
-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Mon Nov 23, 2015 4:33 pm
Bonjour problème,
hm, just tested your script and works as exspected in a new and otherwise empty stack!?
Where did you put your "enterkey" handler?
Best
Klaus
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10331
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Mon Nov 23, 2015 4:45 pm
Probleme.
This is a great lesson.
What Klaus means is that when you discover that you had put your handler in a control script, try to think why that handler did not fire when you pressed the enter key.
Now think about the message hierarchy, and what it would mean if you placed your handler in the card or stack script.
Craig
-
Dixie
- Livecode Opensource Backer

- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
Post
by Dixie » Mon Nov 23, 2015 4:45 pm
Klaus...
Just tried the same... clean stack... handler in the stack script
Code: Select all
on enterKey
put "boo"
end enterKey
Nothing... not a thing.. nada !
LC 7.1 build 10043
-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Mon Nov 23, 2015 4:58 pm
Hm, LC 7.1.1 RC3 and LC 8 DP9, the handler works fine in card and stack script!?
-
LCNeil
- Livecode Staff Member

- Posts: 1223
- Joined: Wed Oct 03, 2012 4:07 pm
Post
by LCNeil » Mon Nov 23, 2015 4:59 pm
Could the issue be with using enterKey instead of returnKey?
Code: Select all
on returnKey
put "Enter key pressed"
end returnKey
Kind Regards,
Neil Roger
--
LiveCode Support Team ~
http://www.livecode.com
--
-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Mon Nov 23, 2015 5:00 pm
ENTERKEY works fine, see above!

-
Dixie
- Livecode Opensource Backer

- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
Post
by Dixie » Mon Nov 23, 2015 5:05 pm
Neil...
Using
Code: Select all
on returnkey
put "boo"
end returnkey
works fine... in the dictionary entry for the 'returnKey'.. 'The Return key (confusingly labeled "Enter" on some keyboards) is usually located above the right-hand Shift key. It is the key you press to go to a new line.'... but there is also an entry for 'enterKey' and that is what the OP asked about and is not working...

-
LCNeil
- Livecode Staff Member

- Posts: 1223
- Joined: Wed Oct 03, 2012 4:07 pm
Post
by LCNeil » Mon Nov 23, 2015 5:32 pm
Yes, but I was curious is the OP was getting the return key mixed up with enter key
Kind Regards,
Neil Roger
--
LiveCode Support Team ~
http://www.livecode.com
--
-
FourthWorld
- VIP Livecode Opensource Backer

- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
-
Contact:
Post
by FourthWorld » Mon Nov 23, 2015 5:48 pm
If this is happening in a field control try the messages for that: returnInField and enterInField.
-
problème
- Posts: 77
- Joined: Fri Oct 23, 2015 12:03 am
Post
by problème » Mon Nov 23, 2015 6:40 pm
ho sry, in fact "on enterkey " refer to the enter key next to the numeric pad and on my laptop i don't have a numeric pad ^^
on returnkey work properly
thanks for the helps
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10331
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Mon Nov 23, 2015 7:03 pm
Ha.
A stampede of helpers, all with the wrong take (except Neil) and all the time is was the non-standard keyboard.
-
dave.kilroy
- VIP Livecode Opensource Backer

- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
-
Contact:
Post
by dave.kilroy » Mon Nov 23, 2015 11:21 pm
Aha - we now have a collective noun for LiveCode developers - a 'stampede'
"...this is not the code you are looking for..."