Blueprint for toggle material not working

Put a PrintText node after the F in order to check whether the key fires at all; if it’s not printing anything, you need to enable Auto Receive Input in Class Settings (top toolbar) for this blueprint.