I am using the OptionMenu widget in tkinter to create a dropdown. I am able to navigate to it using the tab key(takefocus) but in order to collapse it I need to hit spacebar (or click the menu). Is there a way to hit the tab key to collapse this menu (after which I can use the arrow keys to select my required option)?
drop_down = OptionMenu(tk_obj, option_menu, *options_list, command=set_selected_option)
drop_down.config(takefocus=1)