pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Cardkb

Example

Prints the value of the pressed key.

from m5stack import *
from m5ui import *
from uiflow import *
import hat

setScreenColor(0x111111)

hat_cardkb_1 = hat.get(hat.CARDKB)

print(hat_cardkb_1.keyData)
print(hat_cardkb_1.keyString)
print(hat_cardkb_1.isNewKeyPress())

API

hat_cardkb_0.keyData
  • Get the value of the single key pressed.
hat_cardkb_0.isNewKeyPress()
  • Get the status of the currently pressed key.
hat_cardkb_0.keyString
  • Get the input string.
On This Page