Although I find it a bit hacky to use the Robot class, it served my application well on Linux, Mac OSX and Windows. Now, I am trying to use it on Fedora, but the Robot Class is not working properly.
I use the Robot to press Enter or TAB in some situations, such like getting focus on the next ComboBox on selection of an item in the previous one.
My question is: is there any substitute for the Robot Class which is working on Fedora?
I am asking this question, because it has not received a proper answer here: Robot keyPress not working in linux
Note: I am using JavaFX8.
Edit: As Eypros pointed out, the problem is Fedora specific.
JavaFX8 supports public constructors for KeyEvents. I'm assuming you want to fire some button event. In that case, this should work:
KeyEvent enterKey = new KeyEvent(KeyEvent.KEY_PRESSED,"","",KeyCode.ENTER,false,false,false,false);
Event.fireEvent(someButton, enterKey);