Problem for adding a row in a editable grid from keyboard

sorry the nuisance, already that, i had done the same question some days ago, but i have some problems with the solution in my process, my problem were that i wanted to add a new line in a editable grid from the keyboard and the focus in the new line created, but the solutions provided was of much help, in its moment, it functioned me.

The problem in this ocassion is, when i want to repeat the same action in the process, the editable grid no longer to added one line but that it adds  two lines  and the focus is located in the second line, this causes me problem.

Only I want to add one line and the focus locate it in the new line and doesn´t matter  the times to repeat the process.

The script i´ve used is this.

<script type="text/javascript"> 

$(document).keypress(function(e) {

var code=e.keyCode || e.which;

if(code == 43) {

$(".bonita_form_grid_add_button").click();

$('.bonita_form_editable_grid tr:last').find('td:first').click();

$(".gwt-TextArea").focus(); }

else if (code==45){

$(".bonita_form_grid_remove_button").click();

} });

</script>

someone may help me? I appreciate your help, Thanks