#
#
#
#
#
from tkinter import *
tk = Tk()
canvas = Canvas(width=500,height=500)
canvas.pack()
#canvas.create_polygon(0,0,250,250,fill = 'red')
def echo_event(evt):
#打印键盘事件
if evt.type == "2":
print("键盘:%s" % evt.keysym)
#打印鼠标操作
if evt.type == "4":
print("鼠标: %s" % evt.num)
#
print(evt.type)
#键盘事件
canvas.bind_all("
#如果绑定指定的键盘,则"
canvas.bind_all("
canvas.bind_all("
#鼠标事件
canvas.bind_all("
canvas.bind_all("
canvas.bind_all("
canvas.bind_all("