So I was messing around with the python keyboard module and then I wondered how do I make a file dialog popup when you pressed ctrl+S so I searched stack overflow I quickly found out how to with: from tkinter import filedialog root = tk.Tk() root.withdraw() file_path = filedialog.askopenfilename() But what I want to know is how can I filter out the files by like *.txt or *.py with the same method. So if anyone has an answer please tell me. Continue reading...