Multiple actions on one line? Possible

So I have a input field that I would like for people to either press return or enter and have the action take place, or they can click the submit button. I know this is possible, but I can’t seem to figure it out. Help anyone?

so 2 actions
onRelease = function(){


onKeyPress(enter) = function(){

is it possible to put them on the same line?

btn.onKeyPress(enter) and onRelease = function(){