changeset 9249:397ebea6df60

8136416: [TextInputControl] Can't type characters with shift
author leifs
date Fri, 11 Sep 2015 17:06:12 -0700
parents a4702fb1295a
children 9ea2726cb92f
files modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java	Fri Sep 11 06:53:01 2015 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java	Fri Sep 11 17:06:12 2015 -0700
@@ -57,6 +57,7 @@
 import static com.sun.javafx.PlatformUtil.isLinux;
 import static com.sun.javafx.PlatformUtil.isMac;
 import static com.sun.javafx.PlatformUtil.isWindows;
+import static com.sun.javafx.scene.control.inputmap.KeyBinding.OptionalBoolean;
 import static com.sun.javafx.scene.control.skin.resources.ControlResources.getString;
 import static javafx.scene.control.skin.TextInputControlSkin.TextUnit;
 import static javafx.scene.control.skin.TextInputControlSkin.Direction;
@@ -191,7 +192,12 @@
                 // character input.
                 // Any other key press first goes to normal text input
                 // Note this is KEY_TYPED because otherwise the character is not available in the event.
-                keyMapping(new KeyBinding(null, KEY_TYPED), this::defaultKeyTyped),
+                keyMapping(new KeyBinding(null, KEY_TYPED)
+                                    .alt(OptionalBoolean.ANY)
+                                    .shift(OptionalBoolean.ANY)
+                                    .ctrl(OptionalBoolean.ANY)
+                                    .meta(OptionalBoolean.ANY),
+                           this::defaultKeyTyped),
 
                 // However, we want to consume other key press / release events too, for
                 // things that would have been handled by the InputCharacter normally