Inventory Menu Open

What would be the best approach to write code when a player has pressed [tab] to open their inventory menu?  I'm sure I can access for key input event, but I'm looking for a hook of some sort for when the player is viewing their inventory.  That's when I want to create a UI button.. but not when the player is playing.

thanks

Fp is adding being able to parent ui to the inventory this i think will be in next wipe but unsure.
access for key input for player inventory is not an available input key you can detect.