pdf-icon

UIFlow 上手教程

UiFlow1 Blockly

Event

Unit

UiFlow1 项目配置

Hat CardKB

案例程序

打印按键的数值

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())

功能说明

hat_cardkb_0.keyData
  • 获取按下的单个键值
hat_cardkb_0.isNewKeyPress()
  • 获取当前被按下的按键状态
hat_cardkb_0.keyString
  • 获取输入的字符串
On This Page
案例程序
功能说明
Q&A
Submit a question
Select question category*
Arduino
MicroPython
UIFlow1
UIFlow2
EzData
M5Burner
Software
Hardware
Other
Product name
Product version
Question description*
(Supports pasting screenshots.)
Attachments
Add Files
Email*
Submit
OK

M5Stack Support

Hi, this is M5Stack Support. How can I help you today?