I am trying to make it so that when someone presses the bottons on the screen, it adds a letter to the label in the center, and when they click submit it says the word that has been input based on the sounds of the letters added. basically using the letters to create a word input for text to speech. How do I do this? i am stuck on how to get them to input to the label, let alone the coding for the rest.
I’m curious why you’re building a custom keyboard but I guess that’s beside the point.
You should use a label for the box above the Input button.
For each click of a letter button, you’ll need to join the label’s get text block with the button name.
There are ways to do this dynamically so that you don’t have to manually code: if a is clicked, add a; if b is clicked, add b, etc. You’d create/clone letter buttons and then assign letters from a list and then use the Any Component blocks to determine which letter was clicked.
Any component blocks would reduce your code a lot.
When Any Button clicked(returns component)
If button is not equal to Submit button
From label1 set text to join: get text label 1
: get text from Button (component)
You can also use a variable to keep track of your code. Using Any Component, you don’t even need to assign IDs to your components if all have to do the same thing(here, put their letter in a label). In case you want a tutorial:
You can use the same technique in your app.
Hopefully this will work.
now how would I get it linked to the text to speech though?
Its the piece of code under the piece for linking it to the label.