# Property Panel Custom Popup Menu when user presses hotkey over an input field

is it possible to trigger this kind of menu:

in the property panel when I press a hotkey over a button/input field? I want to specifically,when the user presses a specific hotkey when over an input field, call a function that checks if this input field allows divers and if it does to show the user this kind of popup menu (which of course includes own function, etc.).

• This is easy except knowing if and what input field is under the cursor. I dont think this can be pulled off since bpy has nothing on this. You would have to somehow compute the position of elements from dpi, area dimensions and how much the panels are scrolled. And I dont think there is access to something like panel scroll amount. There are only some view_to_region and region_to_view functions on view2d of regions. Dec 10, 2014 at 17:07
• @Jerryno are you sure about that? I mean the tooltips that appear when you have your mouse cursor over a value come from somewhere and my guess is, that is python. So there should be some callback or something for each value field. If you could find that, you should be able to abuse it, right? Oct 8, 2017 at 18:05
• @TeeTrinker What is in those tooltips is defined in python classes, yep. But when, how and where do these tooltips show up is driven internally by Blender. As far as my knowledge goes, it is not exposed to the python api yet. Oct 8, 2017 at 18:24
• For anyone searching for this, you can read this BA thread on workaround using ui.copy_data_path_button (Custom ui operators) Nov 5, 2020 at 1:10