标签:rom alt roo pre http mic root event set
#coding=utf-8 from tkinter import * root=Tk() def callback(event): print("点击键盘",repr(event.char)) frame=Frame(root,width=200,height=200) frame.bind("<Key>",callback) frame.focus_set() frame.pack() mainloop()
效果图:
标签:rom alt roo pre http mic root event set
原文地址:https://www.cnblogs.com/sea-stream/p/10989679.html