attribute description keysym the name of the key that was pressed xy the coordinates of the mouse pointer delta the value of the mouse wheel key events for key eventsyou can either have specific callbacks for different keys or catch all keypresses and deal with them in the same callback here is an example of the latterfrom tkinter import def callback(event)print(event keysymroot tk(root bind'callbackmainloop(the above program prints out the names of the keys that were pressed you can use those names in if statements to handle several different keypresses in the callback functionlike belowif event keysym ='percent 'percent (shift+ was presseddo something about it elif event keysym =' 'lowercase was presseddo something about it use the single callback method if you are catching lot of keypresses and are doing something similar with all of them on the other handif you just want to catch couple of specific keypresses or if certain keys have very long and specific callbacksyou can catch keypresses separately like belowfrom tkinter import def callback (event)print'you pressed the enter key 'def callback (event)print'you pressed the up arrow 'root tk(root bind'callback root bind'callback mainloop(the key names are the same as the names stored in the keysym attribute you can use the program from earlier in this section to find the names of all the keys here are the names for few common keys