-
Bug
-
Resolution: Unresolved
-
P4
-
None
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();
}
}
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();
}
}
- relates to
-
JDK-8090275 KeyCharacterCombination doesn't match the alternative keys
- Open
-
JDK-8094298 KeyCombination matching is broken (at least on Linux)
- Resolved
-
JDK-8089373 Translation from character to key code is not sufficient
- Resolved