Go to next textbox when "Enter" is pressed



Hi Thunkers!,

I decided to make this tutorial because of @dddiam’s topic HERE.

I haven’t seen anyone from App Inventor manage this before, which is why I’m posting this.

Step 1
Insert your textboxes

Step 2
Set ‘MultiLine’ to true

Step 3
Insert a Clock component.

Step 4
Set the following properties for the clock

Step 5
The blocks:

Instead of going to the next TextBox you could also replace ‘Call TextBox.RequestFocus’ to your own procedure.

AIA File: KeyboardTest.aia (2.1 KB)

APK File: KeyboardTest.apk (2.1 MB)

How do I trigger an event when the user is done typing?
Get input from textbox?
How can I limit the numbers of characters the user types on a text box?
How to hide app buttons while keyboard is in use?
Landscape keyboard mode
How to get position of the mouse in textbox
How can I prevent text fields to automatically get focus in APK?
Auto-generate labels based on input

WOW, it’s very useful

I never realised that this could be possible


Great!!! Very useful!


Thanks. I am going to use this


Thank you, Conor. What a clever implementation of a textchanged event!

Is there a CPU hit for having a timer constantly running? How are timers implemented internally?



No, because Thunkable doesn’t support running the app after closing it. For this you must use http://services.appinventor.mit.edu/

Checkout this file: TimerInternal.java
It’s the file that makes the Timer work


Thanks…but that does not work when I check NumbersOnly property.
Are you know any posible solution?



Yes that’s right. This is because the \n character isn’t a number and so cannot be inserted when the enter button is pressed.

I’ve think I’ve got a solution and will let you know shortly.


I’ve got a solution!

Could you test this and see if it works for you?
KeyboardTestNumbersOnly.aia (20.9 KB)


Hi, That work fine, but I need use the Numeric Keyboard for my app, and for this solution is necessary use the normal Keyboard.

Sorry for my English :wink:


I don’t think that the showing the numeric keyboard using this solution is possible.


Here is a more direct approach:

Use the AddEnterPressListener method.



A post was merged into an existing topic: Way to jump from one textbox to another?


That was awesome Colin. Worked perfectly for my login system. thank you