Returning KeybdA page date to text control

Hello,
So am getting used to the nextion display and have all sorts of feature working on multipage apps.
I am even writing a Windows 10 app to chat to Nextion displays via usb/serial. Plus i plan to use this win 10 app as a traffic monitor between a nextion and microcontroller (Adafruit M4).

So this evening i discovered that the nextion display has a built in QWERTY keyboard.
Now i have added to a text box (TextBoxOne.key field “full qwerty\keybdA” which is now load into a new page keybdA and i have load up keybdA via ‘Touch Press Event’ of my text box TestBoxOne with “page keybdA”. So when i press on the TextBoxOne control the page keybdA pops up and when i press OK on the keyboard it closes. Question is please how do i get the data i typed into keybdA back into TextBoxOne.txt please?

I have tried all sorts of things but i just can’t figure it :frowning:

Many thanks in advance imk

Welcome @imk,

Congrats to a successful start with your display. AFAIK only two things are required to get the keyboard working:

  1. Set the .key attribute to the keyboard you want to use
  2. Make the text component global

You don’t need to manually call the keyboard page in the touch events.

Hope this helps!
Max

Hello Max,
Many thanks for the reply, works perfectly on a real lcd.
But i spent a good hour trying it on the debugger, Doh!
Many thanks imk

Glad it worked. It should work in the debugger as well - at least it does for me.

Kind regards,
Max

Hello Max,
Yes the qwerty pops up but typing in the keybd input field does not show data and is also not in the text box after OK is pressed…
I am on version 1.61.2, have i missed something.
Imk

Strange… I can’t reproduce that behavior. I created this most basic example and it works just fine in the simulator. Tested with v1.61.1 and v1.61.2 for the 5" model of the basic, enhanced and intelligent series.
Here’s the testfile: Keyboard Example HMI

Kind regards,
Max

Hello Max
Many thanks for the hmi file and testing, much appreciated.
I tried your hmi in Nex debug and it works as expected :slight_smile:
I tried my hmi in Nex debug again and it now works as expected :slight_smile:
Which is very strange as did not work in debug the other day.
The only explanation i have is my win 10 8gb 64b PC running out of RAM
As about the same time i was testing the Nex, Visual Studio 2019 messed up my Win 10 Nex App.
When i used the Class Editor to edit the PC app that is chatting to the Nex, thru a Out of Memory error.
I have since shut down a number of app as i was running at 95% used RAM.
Plus I have ordered more RAM which has arrive and i will install today.
Again many thanks for your help and advice IMK

1 Like