Im looking for a form to make Scanner to stop reading when you push the first time (so, if I press the key K automatically the program considerer that I press the Intro key, so it stop to recognise inputs, save the K and keep going with the program).
Im using char key= sc.next().charAt(0); in a beginning, but dont know how to make it stop without pushing Intro
Thanks in advance!