Page 1 of 1
enterKey
Posted: Mon Nov 23, 2015 4:28 pm
by problème
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
Re: enterKey
Posted: Mon Nov 23, 2015 4:33 pm
by Klaus
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
Re: enterKey
Posted: Mon Nov 23, 2015 4:45 pm
by dunbarx
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
Re: enterKey
Posted: Mon Nov 23, 2015 4:45 pm
by Dixie
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
Re: enterKey
Posted: Mon Nov 23, 2015 4:58 pm
by Klaus
Hm, LC 7.1.1 RC3 and LC 8 DP9, the handler works fine in card and stack script!?
Re: enterKey
Posted: Mon Nov 23, 2015 4:59 pm
by LCNeil
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
--
Re: enterKey
Posted: Mon Nov 23, 2015 5:00 pm
by Klaus
ENTERKEY works fine, see above!

Re: enterKey
Posted: Mon Nov 23, 2015 5:05 pm
by Dixie
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...

Re: enterKey
Posted: Mon Nov 23, 2015 5:32 pm
by LCNeil
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
--
Re: enterKey
Posted: Mon Nov 23, 2015 5:48 pm
by FourthWorld
If this is happening in a field control try the messages for that: returnInField and enterInField.
Re: enterKey
Posted: Mon Nov 23, 2015 6:40 pm
by problème
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
Re: enterKey
Posted: Mon Nov 23, 2015 7:03 pm
by dunbarx
Ha.
A stampede of helpers, all with the wrong take (except Neil) and all the time is was the non-standard keyboard.
Re: enterKey
Posted: Mon Nov 23, 2015 11:21 pm
by dave.kilroy
Aha - we now have a collective noun for LiveCode developers - a 'stampede'