If you are trying to use a variable that is assigned to the button itself, this is correct behavior. If you want the user to be able to hit the enter key, then put that key/value pair in a hidden field. Then no matter how the form was submitted, the value is passed.