No, the processed keyEvent has only one main KeyCode , for example, this code
public void handle(KeyEvent event) { if (event.getCode() == KeyCode.TAB) { } }
will handle TAB , ALT + TAB or CTRL + TAB , etc. If you are only interested in CTRL + TAB , you have 2 options:
1) using isControlDown ()
public void handle(KeyEvent event) { if (event.getCode() == KeyCode.TAB && event.isControlDown()) { } }
2) using KeyCodeCombination
final KeyCombination kb = new KeyCodeCombination(KeyCode.TAB, KeyCombination.CONTROL_DOWN); ... ... public void handle(KeyEvent event) { if (kb.match(event)) { } }
source share