1from tkinter import *
2
3def doSomething(event):
4 #print("You pressed: " + event.keysym)
5 label.config(text=event.keysym)
6
7window = Tk()
8
9window.bind("<Key>",doSomething)
10
11label = Label(window,font=("Helvetica",100))
12label.pack()
13
14window.mainloop()