Key event doesn't get fired inside a class blueprint

I am trying to fire a custom event when I press E, but it doesn’t seem to get fired when I am inside a class blue print. My custom event OnButtonPressed works with beginoverlap from the triggervolume but doesn’t get fired when I press E.

The E key works if I create the event inside a level blueprint.

Plug in the node ‘Enable input’ on event begin play.