(SOLVED) "enterinField" Not Working With Android Keyboard

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 216
Joined: Tue Aug 05, 2014 10:07 am

(SOLVED) "enterinField" Not Working With Android Keyboard

Post by Googie85 » Thu Jan 21, 2021 7:52 am

Hi Guys!!

I have the following code and I still cant get it to catch the "Enter" key press:

Code: Select all

global bobby
on keyDown theKey
   put theKey after bobby
   put "*" after field "Login"
end keyDown

on backspaceKey
   delete the last char of field "Login"
   delete the last char of bobby
end backspaceKey

on returnKey
   answer "returnKey"
end returnKey

on enterKey
   answer "enterKey"
end enterKey

on returninField
   answer "returninField"
end returninField

on enterinField
   answer "enterinField"
end enterinField
Do you think that there could be a workaround so that when the Enter key is pressed, it does nothing?

Many Thanks,

Googie.

Googie85
Posts: 216
Joined: Tue Aug 05, 2014 10:07 am

Re: (SOLVED) "enterinField" Not Working With Android Keyboard

Post by Googie85 » Fri Jan 22, 2021 6:30 am

I came to this solution...

Code: Select all

global bobby
on keyDown theKey
   
   if theKey = CR then
      delete line 2 of bobby
      break
   end if
   
   put theKey after bobby
   put "*" after field "Login"
end keyDown

on backspaceKey
   delete the last char of field "Login"
   delete the last char of bobby
end backspaceKey

Post Reply

Return to “Android Deployment”