UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import face
setScreenColor(0x222222)
faces_keyboard = face.get(face.KEYBOARD)
def buttonA_wasPressed():
# global params
faces_keyboard.clearStr()
pass
btnA.wasPressed(buttonA_wasPressed)
def buttonB_wasPressed():
# global params
faces_keyboard.deleteStrLast()
pass
btnB.wasPressed(buttonB_wasPressed)
while True:
if faces_keyboard.isNewKeyPress():
print((str('Button value:') + str((faces_keyboard.readKey()))))
print((str('Input string:') + str((faces_keyboard.readStr()))))
wait_ms(2)
faces_keyboard.isNewKeyPress()
faces_keyboard.readKey()
faces_keyboard.readStr()
faces_keyboard.deleteStrLast()
faces_keyboard.clearStr()