Files
Python-2018/test de bouton.py
2019-01-20 00:55:05 +01:00

17 lines
287 B
Python

from tkinter import *
import math
def clavier(event):
touche = event.keysym
if touche=="Return":
print("Je suis génial")
fenetre = Tk()
canvas = Canvas(fenetre, width=500, height=500)
canvas.focus_set()
canvas.bind("<Key>", clavier)
canvas.pack()
fenetre.mainloop()