from tkinter import * def klahv(event): global x, y, r if event.keysym=="Left": x=x-1 if event.keysym=="Right": x=x+1 if event.keysym=="Up": y=y-1 if event.keysym=="Down": y=y+1 ala.coords(ovaal, x, y, x+r, y+r) aken = Tk() ala = Canvas(aken, width=400, height=300, bg='white') ala.pack() x = 0 y = 10 r = 30 ovaal=ala.create_oval(x, y, x+r, y+r, fill="blue") ala.bind("", klahv) ala.focus_set() aken.mainloop()