In app keyboard enter key

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

Post Reply
DavJans
Posts: 275
Joined: Thu Dec 12, 2013 4:21 pm

In app keyboard enter key

Post by DavJans » Fri Feb 28, 2014 10:50 pm

I can't seem to figure out. I've created a 10 key and my numbers work like this, no. 1 for example

Code: Select all

on mouseUp
Put "1"  into the selection
end mouseUp
what I cant figgure out is how to send an enter command.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: In app keyboard enter key

Post by Simon » Fri Feb 28, 2014 10:53 pm

Hi DavJans,
How about this
on enterKey

I think it's normal to also use
on returnKey
enterKey
end returnKey

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: In app keyboard enter key

Post by dunbarx » Fri Feb 28, 2014 11:24 pm

Hi.

What is a "10 key"? Is it ten buttons like a keypad? And if so, when you put, say, "1" into the selection, what do you mean? Is there a field somewhere that gets this digit? If so, what do you want to do next? In other words, where does the "enter" key, or the "enter" message come into play? In still other words, can you say a bit more about what you already have, and what you are trying to do?

It looks, actually, like you are making an RPN calculator. Is this so? Great project if it is. Write back.

Craig Newman

DavJans
Posts: 275
Joined: Thu Dec 12, 2013 4:21 pm

Re: In app keyboard enter key

Post by DavJans » Sat Mar 01, 2014 12:09 am

a 10 key is the numbers and the calculation buttons on the right side of your keyboard basically a calculator.
What I really want to do is make a button that I can push and it will do the exact same thing as if I had pushed the enter key on my keyboard.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: In app keyboard enter key

Post by Simon » Sat Mar 01, 2014 2:28 am

OK then,
enterInFIeld

I'm thinking you may want to use the physical keyboard as well so,

Code: Select all

on enterInField
 beep
end enterInField
on returnInField -- this allows for the return key to be used as well
  enterInField 
end returnInField
Place that in the field script and for the button you'd "send enterInField to fld 1"
If you didn't want the keyboard at all then make up your own command and send that.

I'm not comfortable with "Put "1" into the selection", it is working but normally I'd say
put 1 after fld "myDisplay"
Might just be me :?

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

Post Reply