I have used scrolledText widget for user input in my chatbot. I bind the "ENTER" key to post user response to chat window, but it's not coming to new line in user input window. Below are my code:
self.usr_input = ScrolledText.ScrolledText(self, height=3, bd=1)
self.usr_input.grid(row=10, column=0)
self.usr_input.focus() # Sets focus to the input bar at start
self.usr_input.bind('<Return>', lambda e: self.get_response()) # Binds ENTER Key
My expectation : "ENTER KEY" --> Post to chat window ( Working)
"SHIFT + ENTER Key " --> Next line in scrolledText ( Not Working )
Please suggest if any modification is required to the above code.
Thank you in advance!