# Scanner (java.util.scanner) doesn't seem to be working?

**URL:** <https://discourse.processing.org/t/scanner-java-util-scanner-doesnt-seem-to-be-working/4958>\
**Category:** Coding Questions\
**Created:** [October 28, 2018, 4:53pm UTC](https://discourse.processing.org/t/scanner-java-util-scanner-doesnt-seem-to-be-working/4958 "2018-10-28T16:53:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danny\_Posada](https://avatars.discourse-cdn.com/v4/letter/d/ba9def/32.png) [@Danny\_Posada](https://discourse.processing.org/u/Danny_Posada)\
**Post date:** [October 28, 2018, 4:53pm UTC](https://discourse.processing.org/t/scanner-java-util-scanner-doesnt-seem-to-be-working/4958/1 "2018-10-28T16:53:42Z")

</div>

Recently I’ve been trying to experiment with user input in processing, but nothing seems to be working. I’ve tried multiple websites but none of them have given me and answer that works. The problem is that when I run the code Processing refuses to acknowledge the fact that I am typing on the keyboard. Like, when I start the program and type, nothing shows up in the console. It would be a huge help if somebody could tell me what’s going on. Thank you very much!

Code:  
import java.util.Scanner;  
Scanner kb = new Scanner(System.in);

println(“What do you want to say?”);  
String k = kb.nextLine();  
println(k);

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [October 28, 2018, 5:19pm UTC](https://discourse.processing.org/t/scanner-java-util-scanner-doesnt-seem-to-be-working/4958/2 "2018-10-28T17:19:26Z")

</div>

Hey,

I think that the Processing console is not made for using the `java.util.Scanner` functions as it’s not interactive.

The solution is to use this :

- [https://processing.org/reference/key.html](https://processing.org/reference/key.html)
- [https://processing.org/reference/keyPressed.html](https://processing.org/reference/keyPressed.html)

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [October 28, 2018, 7:32pm UTC](https://discourse.processing.org/t/scanner-java-util-scanner-doesnt-seem-to-be-working/4958/3 "2018-10-28T19:32:11Z")

</div>

- [Forum.Processing.org/two/discussion/12532/windowjs-cross-mode-alert-confirm-prompt-other-js-api-for-java](http://Forum.Processing.org/two/discussion/12532/windowjs-cross-mode-alert-confirm-prompt-other-js-api-for-java)

`http://Studio.ProcessingTogether.com/sp/pad/export/ro.9$Bjf6i21oXBw`

> <https://gist.github.com/GoToLoop/bba0c288aaeeb5ef9bb1>
