Thanks Mindphazer, I think the thing that confused me is that the below Select/Case, isn't specifically checking for the Enter key, but simply that #gad_number is tested as the active gadget for "whatever event" took place...Mindphazer wrote: Sat Oct 15, 2022 2:39 pm If you press Enter and the active gadget is #gad_number, or if you press the button (#gad-add) then you call AddNumber()
Code: Select all
ev=WaitWindowEvent()
If ev=#PB_Event_Menu
Select GetActiveGadget()
Case #gad_number,#gad_add : AddNumber()