You've not said otherwise so I assume you're using Swing since you mention Robot, although JavaFX has a Robot too...
- How to listen to keyboard events when a Java process is in the background
This is not possible without resorting to JNA or JNI, you can only get keyboard events on Java windows with focus. Other questions such as Key listener written in Java JNA. Prevent multiple Callback deal with this. Please be aware your solution will be platform dependent.
- How to simulate scroll events.
I believe can be achieved with the mouse wheel event.
Robot robot = new Robot();
robot.mouseWheel(1);
robot.mouseWheel(-1);