then maybe do not enclose it in if, just ahve 
```
buttons = []

buttons << PushButton(Id(:rescan), Opt(:key_F6), _("Rescan Devices"))