Active Member ReFresh 2340 Posted August 19, 2021 Active Member Share Posted August 19, 2021 (edited) Hey guys, is here someone who know how to enable ENTER keys in confirm dialogs? (I mean both ENTER keys - large and small on keyboard). Like you can press ENTER key in select character window to select the character, but for confirm dialogs. Thanks for answers! Sincerely, ReFresh Edited August 19, 2021 by ReFresh I'll be always helpful! Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10270 Posted August 19, 2021 Forum Moderator Share Posted August 19, 2021 (edited) Not tested. uiCommon.py This is the hidden content, please Sign In or Sign Up Edited August 26, 2021 by VegaS™ 18 2 1 9 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1196 Posted August 19, 2021 Active+ Member Share Posted August 19, 2021 Or you can call the accept button event like this: def OnIMEReturn(self): if self.acceptButton: self.acceptButton.CallEvent() return True 1 Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10270 Posted August 19, 2021 Forum Moderator Share Posted August 19, 2021 (edited) @Abel(Tiger)That's right, it's useless to re-declare the lambda function since we can call it from the default method, I really forgot it. Edited August 19, 2021 by VegaS™ 1 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted August 19, 2021 Author Active Member Share Posted August 19, 2021 @VegaS™ @Abel(Tiger) Thank you both guys!! So I did it like that: Spoiler def Open(self): self.SetCenterPosition() self.SetTop() self.acceptButton.SetFocus() #ADDED THIS LINE self.Show() def SetAcceptEvent(self, event): self.acceptButton.SetEvent(event) self.acceptButton.OnIMEReturn = event #ADDED THIS LINE Is that right solution? How did you thought? I'll be always helpful! Link to comment Share on other sites More sharing options...
Forum Moderator Solution VegaS™ 10270 Posted August 19, 2021 Forum Moderator Solution Share Posted August 19, 2021 (edited) No, you've to do it like this: This is the hidden content, please Sign In or Sign Up Edited August 26, 2021 by VegaS™ 19 3 9 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Recommended Posts