Use hexadecimal values for key states.