Renamed tkinter import to tk. Refactored tkinput with bind methods. Added test function with pattern to get last selected item from listbox.