Bind a shortcut to minimize the current pane in RStudio, with RStudioAPI

I think this had been asked last year, I don't think RStudio had a build-in shortcut for this right now.

last year's question

I am also learning how to write add-ins for RStudio, so I am keen to learn if there's any pane operations that is available from RStudioAPI. I searched the documentation to no avail, so wondering if there's any black magic that allows one to do this.

Thanks, any help is appreciated.