Stop Input with Control Z: Java Loop

  • Context: Comp Sci 
  • Thread starter Thread starter Punkyc7
  • Start date Start date
  • Tags Tags
    Java Loop
Click For Summary
SUMMARY

The discussion focuses on implementing a Java loop that allows users to stop input by pressing Control Z. Users are advised to search for the term "trap keystrokes" to find relevant examples and solutions. The conversation highlights the need for handling specific keystrokes in Java applications to enhance user experience. Participants emphasize the importance of understanding how to capture and respond to keyboard events in Java.

PREREQUISITES
  • Java programming fundamentals
  • Understanding of input handling in Java
  • Knowledge of keyboard event listeners
  • Familiarity with Java's System.in and Scanner classes
NEXT STEPS
  • Research "Java keyboard event listeners" for capturing keystrokes
  • Explore "Java Scanner class" for handling user input
  • Learn about "Java exception handling" to manage input interruptions
  • Investigate "Java AWT and Swing" for advanced input handling techniques
USEFUL FOR

Java developers, software engineers, and anyone looking to enhance user input handling in Java applications.

Punkyc7
Messages
415
Reaction score
0
I am having the user enter a bunch of strings and when the user wants to stop entering them I want him to use control z to stop the input. The only problem is I can't seem to figure how to make that happen, does anyone have any suggestions?
 
Physics news on Phys.org
There should be lots of examples on line you can follow. The phrase you want to Google is 'trap keystrokes'
 
Ok thank you, I didnt know what to look for
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
2K
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 5 ·
Replies
5
Views
3K