How could one call a function by key press in the editor window (Utility Editor Blueprint)

Im trying to make an Editor tool where I can select an actor in the Level (through raycasting) and apply different functions to it. Would it be possible to have a certain keybind that, when pressed, activates said function?

Very curious about this too, I can’t find an answer anywhere