Tkinter: Pressing alt while the window or any of its widgets are in focus makes the window freeze (Even if it’s an empty window)

  alt, python, tkinter, windows

So I was gonna implement a functionality where when I press alt an entry is gonna say "Alt + " and when I release alt the text inside the entry is gonna be removed. The first step works, it writed "Alt + " as planned, but when I release alt again the text doesn’t update until I press anywhere on the window again.

I seem to have this problem even on an empty window, when I press alt while focus is on the window the functionality of hovering the exit button and seeing it light up red also dissapears until I click the window again. Anyone know why this is? The same thing happens when I try it on my laptop (using Windows 10 on both my PC and laptop)

Source: Windows Questions