Add a button with the default property, so whenever the user presses Enter in the dialog, a sclick event for that button will trigger. Example:
  • dialog x {
    size -1 -1 100 55
    edit "" 1, 5 5 90 20
    button "Go!" 2, 25 30 50 20, default
    }

    On *:dialog:x:sclick:2:echo Pressed button
Open the dialog - /dialog -m x x, type something in the editbox and press Enter. A message will appear.