menue while key is pressed - menu has buttons to click

Hi!

I have a hard time working this one out. Now i have a widget menu that I want to show while the player is holding down a key. The player can then click buttons in this menu. When he releases the key that shows the menu it should dissapear.

Now i know the basics of using widgets. I have a problem though. If i want to click buttons in the menu i need to set the input mode from game only to game and UI or UI only to click a button. This will somehow execute the release of the key I am holding down.

How does one go about this?