executes whatever arbitrary function gets passed into the directive when `enter` is pressed. seemed like something we will want to reuse.