Reputation: 337
I'm trying to learn Tkinter but I'm running into a problem. I'd like it so once the user hits their Enter key it will copy what is in an Entry field. I was planning on using the .bind() method but it doesn't seem to register my key presses. I tried multiple ways and it seems if they are keyboard related, they do not work.
self.frame.bind("<Return>", self.testevent) #Doesn't Work
self.frame.bind("<Enter>", self.testevent) #Works
self.frame.bind("<Button-1>", self.testevent) #Works
self.frame.bind("<F1>", self.testevent) #Doesn't work
There are no errors that pop up when the script is compiled. I've looked around and have been unable to find an answer.
Edit: One of my sentences was jumbled.
Upvotes: 0
Views: 2042