Controlling 2 servo motors with Arduino via Processing (is there a better way?)

You are absolutely right! The two last lines was not nessesary.

The delay is however needed. If I take it away the motors don´t have time to start since of the command sent to them only being processed for like 1ms. If i however add more than 17-20ish ms to delay the delay-time stacks up and when I then hold the button on the keyboard to drive the motors they don´t stop when i let the button go. Instead they stop when the stacked up ms is out.

For reference, if I change the delay to say 1000ms (1 sec) and hold down the responding keyboard button the motors go on way to long after the button is released. However, giving a lower value than 17 makes the motors run very choppy. And even with 17 they strutter every once in a while as well. I think I need to get them running smoother. Somthing like "Keep running untill the button is actually released", but can´t seem to find that kind of function...