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

[Glass, Linux, Mac, Monocle] KeyCharacterCombination matching for tab and newline is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • tbd
    • None
    • javafx

    Description

      See RT-38778 for more details. Sample:

      public class Hello {
          static class KeyPair {
              private String character;
              private KeyCode code;

              KeyPair(String character, KeyCode code) {
                  this.character = character;
                  this.code = code;
              }
          }

          public static void main(String[] args) {
              new JFXPanel(); // initialize JavaFX

              for (KeyPair kp : Arrays.asList(new KeyPair("\n", KeyCode.ENTER), new KeyPair("\t", KeyCode.TAB))) {
                  KeyCharacterCombination kcc = new KeyCharacterCombination(kp.character);
                  KeyEvent event = new KeyEvent(KeyEvent.KEY_PRESSED, kp.character, "", kp.code, false, false, false, false);
                  System.out.println("KeyCode." + kp.code.getName() + " matches: " + kcc.match(event)); // true (!!!)
              }

              Platform.exit();
          }
      }

      Attachments

        Issue Links

          Activity

            People

              mfox Martin Fox
              msladecek Martin Sládeček
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Imported: