Key Press

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ncmac
Posts: 31
Joined: Thu Apr 27, 2006 10:29 pm

Key Press

Post by ncmac » Mon Jan 30, 2012 1:01 am

This may sound strange, but I am struggling with trapping a virtual alphanumeric key press in iOS. It has to do with a BlueTooth accessory sending a key press, such as “1” or “2” which will activate a script. I have been working with keyUp and rawKeyUp, but no luck in iOS. Would anyone have any suggestions? Thanks in advance!

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Key Press

Post by Dixie » Mon Jan 30, 2012 3:32 am

Hi...

You could use a UITextfield to catch the input and take advantage of the message 'inputTextChanged' that is sent when text is entered in the field... grab what you entered, do what you have to do and then empty the UITextField waiting for the next 1 or 2... page 57 of the iOS release notes...

be well

Dixie

I have attached a stack that catches the input...
Attachments
UIInputText.livecode.zip
(2.11 KiB) Downloaded 249 times

ncmac
Posts: 31
Joined: Thu Apr 27, 2006 10:29 pm

Re: Key Press

Post by ncmac » Tue Jan 31, 2012 10:26 pm

Thanks! I appreciate your help.

Post Reply