Is it possible to replace the mouse click of a button (as with 'Submit" in code below) with keyboard ‘Enter’ key?
Would appreciate a tip.
Code Sample:
def search_button_click(self, **event_args):
search_page = {}
submit_clicked = alert(
content= Userpage(item = search_page),
title="Search data",
large=True,
buttons=[("Submit", True), ("Cancel", False)],
) ```
I’m guessing the content of your alert has a text box or something with the “pressed_enter” event.
You can close an alert manually and send back a custom value (in your case, True or False), just like if your user clicked the buttons.
1 Like
Great!
Thank you for the tip.
I checked my codes. The clickable item is coded, no button component to bind a ‘pressed enter’ event. So, I am back to square one on this.
Can you share an image of how your alert looks like so we can try to help you better?
1 Like