Single key input property in UI Panel How to capture a single key user input in the UI panel of the add-on? 

The UILayout documentation mentions an event parameter in the prop method. If this is set to True, there appears a single key input control in the UI Panel. But I am unable to capture the key pressed on this control. 

Would appreciate any help.
To capture a single key, the event param of prop in UILayout needs to be set to True and the corresponding property needs to be an EnumProperty with ALL the key codes mapped. 

When the user presses a key on the control, the EnumProperty item that is related to the code of the key pressed, gets selected.

Please post your answer if you have any better alternative.