Detect key pressed in bpy.props.StringProperty

I need to detect the keys pressed in a bpy.props.StringProperty, including the number for numpad, Alt key, etc.

My idea is to know if the user press for example Ctrl key to add the word “CTRL” to the string property and so on.

I have done this en C# and Java, but I have no idea of how to do it in python.

Anyone can give me any advice?

Antonio

There’s UILayout.prop(…, full_event=True), but not sure how to use it, or if it’s even possible for a Python-defined property. It doesn’t look like it.