The conditional clause of the while loop

At the beginning of each iteration of the while loop in Listing 2, the array element corresponding to the Esc key is checked to see if that key if pressed.

If the Esc key is not pressed:

The element contains a value of false:

Which is inverted by the (!) operator

Causing the conditional clause to return true

Causing the while loop to execute one more iteration.