so i wanna bind an enter button to the function so it will work when i press the button with enter button. but, everytime i do that the button always has a weird bug sometime it always getting in a pressed state or sometime the button act as i write an foregroundonactive parameter in the code.
i always write like this
def itung():
import speedtest
st = speedtest.Speedtest()
lbl['text']=round(st.download/1000000,2)
lbl= Label(root,width=5,height=3)
lbl.place(x=n,y=n)#n here is just an example
btn = Button(root, text='tombol', bg='brown', fg='yellow')
btn.place(x=n,y=n)#n here is just an example
btn.bind('<Return>',itung)
so can someone help me?