I have been fooling around in python (v3.9.10) and I have found no way to read keypresses from the enter key and have tkinter do something with that keypress. I am trying to make a dumb little program to show some numbers on my screen for school and want to be able to do it quickly. this is my code so far:
from tkinter import *
#DEFS
def submit():
submitted=entrybox.get()
display.config(text=submitted)
app=Tk()
entrybox=Entry(width=10)
entrybox.place(x=10,y=10)
#display label
display=Label(text=' ')
display.place(x=50,y=50)
display.config(font='Arial 72')
#submit button
subbutton=Button(text='SUBMIT',command=submit)
subbutton.place(x=70,y=10)
(Sorry if my code looks really bad I am quite new to python and everything it has to offer) (I am also sorry for sounding repetitive and/or dumb. Forums such as this aren't familiar to me either)
is there any way to read key presses from the enter key while allowing the rest of my tkinter stuff to run as intended? thanks in advance.