Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8215545

Windows Key + Arrow Key shortcuts don't work with UNDECORATED and TRANSPARENT

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      With the default StageStyle, a JavaFX application's stage reacts to the Windows Key Shortcuts to have the application take up one half of the screen—those shortcuts being Win + Left Arrow and Win + Right Arrow.

      When the application has the UNDECORATED or TRANSPARENT StageStyles, it *doesn't* react to the Left or Right Shortcuts. Interestingly, though, such stages *do* react to the Windows Key + Up shortcut to maximize them.

      DESIRED BEHAVIOR:
      Windows Key + Left Arrow: Have application take up up the left half of the current screen.
      Windows Key + Right Arrow: Have application take up up the right half of the current screen.


      The shortcuts, (from Microsoft: https://support.microsoft.com/en-us/help/12445/windows-keyboard-shortcuts)
      Windows logo key + Up arrow Maximize the window.
      Windows logo key + Down arrow Remove current app from screen or minimize the desktop window.
      Windows logo key + Left arrow Maximize the app or desktop window to the left side of the screen.
      Windows logo key + Right arrow Maximize the app or desktop window to the right side of the screen.

      AN EXAMPLE APPLICATION:
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.layout.BorderPane;
      import javafx.stage.Stage;
      import javafx.stage.StageStyle;

      public class WindowsKeyShortcut extends Application {
          @Override
          public void start(Stage primaryStage) throws Exception {
              BorderPane root = new BorderPane(new Label("Try the Windows Key with each arrow key."));
              Scene theScene = new Scene(root);
              primaryStage.setScene(theScene);


              primaryStage.initStyle(StageStyle.UNDECORATED);
              primaryStage.show();
          }

      }



            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: