from Tkinter import * def key_event(event): print 'keysym:' + event.keysym root = Tk() text = Text(root,height=10,width=50,font='courier 9') text.bind("", key_event) l_b_ts = text.bindtags() print 'return value of bindtags() "', l_b_ts, '"' #text.bindtags((l_b_ts[1],l_b_ts[0],l_b_ts[2],l_b_ts[3])) # this wont recognize tabs text.bindtags((l_b_ts[0],l_b_ts[1],l_b_ts[2],l_b_ts[3])) # this will recognize tabs, # but may have other unwanted side effects text.pack() root.mainloop()