Python ui.messageBox and keyboard response

Hi,

I’ve found the ui.messageBox() method pretty easy to use lately. But is it possible to ‘click’ the buttons of it with key strokes? I’d like to map for example escape key to ‘cancel’ and enter key to ‘OK’ or even reach the buttons with midi notes.

I only managed to do it with the mouse. Ideally, I want to control all buttons of my UI with a midi device. Also those in popup windows.

Alternatively, I’ve had to build me a ‘yes / no’ - popup window myself, that handles the input.

Cheers

Is there a specific reason you want it to be in a message box and not just an interface that pops open in a Window COMP?