Maybe make these into variables like `bool not_user_input = p[2] != (int)KE_EVENT` to avoid comments and make it more readable?