I believe what you want is to bind the key press to the frame/function. Tkinter has its own event and binding handling built in which you can read up on here.
Here is quick example which you should be able to adapt your program.
from tkinter import *
root = Tk()
def yourFunction(event):
print('left')
frame = Frame(root, width=100, height=100)
frame.bind("<Left>",yourFunction) #Binds the "left" key to the frame and exexutes yourFunction if "left" key was pressed
frame.pack()
root.mainloop()