while True: if keyboard.is_pressed('c'+'o'+'p'+'y'): tk.messagebox.showinfo("Message Box", "copy") break