from Tkinter import *

def move_mitt(event):
	global mitt
	global gameCanvas
	global mittx, mitty

	if event.char=="j":
		mitty = mitty+10
	elif event.char=="k":
		mitty = mitty-10
	gameCanvas.coords(mitt, mittx, mitty, mittx+MITT_SIZE, mitty+MITT_SIZE)


MITT_SIZE = 20

root = Tk()
gameCanvas = Canvas(root, width=400, height=400)
gameCanvas.grid(column=0,row=0)
gameCanvas.wait_visibility()

mittx = gameCanvas.winfo_width()-30
mitty = gameCanvas.winfo_height()/2
mitt = gameCanvas.create_oval(mittx, mitty,
							  mittx+MITT_SIZE, mitty+MITT_SIZE, 
							  fill="blue")

root.bind("k", move_mitt)
root.bind("j", move_mitt)

root.mainloop()