Is there a way to test for keyboard input without using cin >>, and then extracting that input when it is present?