You need to put the holding down key functionality in a new thread to get the functionality you're aiming for. The press key/release key stuff only sends a single input to the client respectively. typeContinualKey also works but to simulate holding key something like this if what you're looking for
while (true) {
press key down
release key
sleep(30)
}