Im working on multiplatform applicaiton for mac and windows. Chose java fx as platform and started working on it. Once my app opens , user should not switch to any app without closing clicking on custom close button from user interface. Trying to disable three finger swipe(switching application and desktop). used scroll and swipe listeners to consume event but couldnot . Are there scripts which could be executed on os level through runtime or invoking script.
Also could not consume ALT+TAB events too.
Code below for ALT +TAB:
final KeyCombination kb =new
KeyCodeCombination(KeyCode.TAB,KeyCombination.ALT_DOWN );
scene.setOnKeyPressed(new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
// TODO Auto-generated method stub
System.out.println(event);
System.out.println("KB:"+kb);
if(kb.match(event)){
event.consume();
}
label.setText(labelText+" \n Entered key "+event.getCode());
}
});