Java Scanner: stop reading after the first entry
<p>Im looking for a form to make <em>Scanner</em> to stop reading when you push the first time (so, if I press the key <em>K</em> automatically the program considerer that I press the <em>Intro</em> key, so it stop to recognise inputs, save the <em>K</em> and keep going with the program).</p>

<p>Im using <strong>char key= sc.next().charAt(0);</strong> in a beginning, but dont know how to make it stop without pushing <em>Intro</em></p>

<p>Thanks in advance!</p>