import tkinter as tk
from collections import deque
konami_code = ["Up", "Up", "Down", "Down", "Left", "Right", "Left", "Right", "b", "a"]
queue = deque(maxlen=10)
def check_code(event):
global queue
queue.append(event.keysym)
if list(queue) == konami_code:
print("Konami code entered!")
# buraya istediğiniz kodu yazın
root = tk.Tk()
root.bind("<Key>", check_code)
root.mainloop()