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

[Accelerator, Mac] CMD + Z accelerator is not working with French keyboard

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u40, 9
    • Fix Version/s: tbd
    • Component/s: javafx
    • Environment:

      Mac OS X Mavericks

      Description

      Run this sample test :


      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.MenuButton;
      import javafx.scene.control.MenuItem;
      import javafx.scene.input.KeyCode;
      import javafx.scene.input.KeyCodeCombination;
      import javafx.scene.input.KeyCombination;
      import javafx.stage.Stage;

      public class TestshortcutZ extends Application{

          
          public static void main(String[] args) {
              launch(args);
          }
          
          @Override
          public void start(Stage primaryStage) throws Exception {
              MenuButton button = new MenuButton("test");
              MenuItem item = new MenuItem("test");
              item.setOnAction(new EventHandler<ActionEvent>() {

                  @Override
                  public void handle(ActionEvent event) {
                      System.out.println("TRIGGERED");
                  }
              });
              item.setAccelerator(new KeyCodeCombination(KeyCode.Z, KeyCombination.SHORTCUT_DOWN));
              
              button.getItems().add(item);
              
              Scene scene = new Scene(button);
              primaryStage.setScene(scene);
              primaryStage.setMinHeight(300);
              primaryStage.setMinWidth(100);
              primaryStage.show();
          }
      }


      Try to to CMD + Z with a Mac, nothing happened. If you do it with Windows, the command will become "CTRL+Z" and it is working.

      I have tested it with 8u20, I don't have the 8u40 right now on my Mac so I need a confirmation for that version.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              shadzic Samir Hadzic
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Imported: