Example of reading keyboard

Do this inside the while loop

if (StdDraw.isKeyPressed(KeyEvent.VK_UP)) {
    v_y = 400;
}