Input from Character Set
This example will show you how to input using a charset.
Process
Imports
Define your charset (list of accepted/valid chars)
You also need to track the active index of the list
Move to an ItemInput menu item
Use up()
and/or down()
to navigate to an ItemInput
.
Enter edit mode
Execute enter()
to go to edit mode. (the cursor will start blinking 😉)
Use up()
and down()
to cycle through your charset
up()
and down()
to cycle through your charsetdrawChar(char c)
is used to display the character without storing the value, the value will be stored only when type(char character)
is executed.
Type the selected character
Use menu.type(char character)
to type the selected character
menu.back()
will exit edit mode
menu.back()
will exit edit modeThe value of the menu item will be passed through to the callback function attached to this item.
Full example 👉 .../examples/CharsetInput/CharsetInput.ino
Last updated