Custom Key actions not working when hovering or focused on Textinput Object

I dicovered this problem when i made a condition to press the return key to confirm a written command made in the TextInput Object, But it doesn’t function properly by not executing. It only works if it is not focused and not touching the hitbox of the TextInput. Then the custom key works.