Suppose you have this code.
def test(widget):
print(keyboard.is_pressed("shift"))
t=tkinter.Tk()
b=tkinter.scrolledtext.ScrolledText()
b.bind("<Return>", test)
b.pack()
t.mainloop()
Just on the very first try of holding shift and pressing enter, it prints False but after that it works fine (the first time this event is triggered, if shift is held down, it is not detected, but after that it works).