I want to make a custom keyboard to control the CNC machine. The keyboard on the machine itself was damaged and my idea is to replace it with a touch screen. I made a program that looks similar to a keyboard, the keys I click work but only within my program.
How do I pass the clicks on my virtual keyboard to Windows / another program?
Here is UI my UI
Key listeners
@FXML
void clickOnZero(TouchEvent event) {
KeyEvent press = new KeyEvent(zero_btn, zero_btn, KeyEvent.KEY_PRESSED, "", "", KeyCode.DIGIT0, false, false, false, false);
shift_btn.fireEvent(press);
}
EDIT
To be a little clearer. My program is a keyboard and separately is the original program for CNC. I would split the screen in two and it would work that way. My problem is how to click on a key in my program to simulate the keystroke on an actual keyboard so that the CNC program can see it