Use some constants EV_KEY_RELEASED, etc instead of magic numbers.