📜  tkinter 如何将键盘键连接到按钮 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:34.110000             🧑  作者: Mango

代码示例1
import tkinter as tk
root = tk.Tk()

btn = tk.Button(root, "Press me")

def do_something():
  pass

btn.bind('', do_something)