[PATCH 1/3] packet.c: do not poll() for key press when not needed