keyk
keyk

Reputation: 3

Get keyboard input from user in java with the program running in background

I once saw a youtube video here and I thought that it would be good exercise to code it myself in java. The Problem is that i can't seem to find a way to read Keyboard input from the user while the program runs in the background, the obvious reason is that it would be dangerous to read the input from the user without the user knowing. I am open for different alternativ ways if there are any.

Upvotes: 0

Views: 536

Answers (1)

kabuto
kabuto

Reputation: 96

Hey I can't find a way to do this in core Java, but here is a github repo you may find useful. It seems to be a global key listener in Java.

Hopefully that GitHub repo helps but use it at your discretion, I'm sure you understand the potential dangers of creating something like this!

Upvotes: 1

Related Questions