changeset 7326:9b91b21cd638

RT-37598 [Monocle] event.getCharacter() is not always retrieving correct char
author Elina Kleyman <elina.kleyman@oracle.com>
date Sun, 22 Jun 2014 12:57:01 +0300
parents 7718bee48299
children 546a65de05f2
files modules/graphics/src/main/java/com/sun/glass/ui/monocle/input/KeyInput.java
diffstat 1 files changed, 22 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/monocle/input/KeyInput.java	Sat Jun 21 07:03:38 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/monocle/input/KeyInput.java	Sun Jun 22 12:57:01 2014 +0300
@@ -163,30 +163,30 @@
             c = '/';
         } else if (shifted) {
             switch (key) {
-                case KeyEvent.VK_BACK_QUOTE: c = '~';
-                case KeyEvent.VK_COMMA: c = '<';
-                case KeyEvent.VK_PERIOD: c = '>';
-                case KeyEvent.VK_SLASH: c = '?';
-                case KeyEvent.VK_SEMICOLON: c = ':';
-                case KeyEvent.VK_QUOTE: c = '\"';
-                case KeyEvent.VK_BRACELEFT: c = '{';
-                case KeyEvent.VK_BRACERIGHT: c = '}';
-                case KeyEvent.VK_BACK_SLASH: c = '|';
-                case KeyEvent.VK_MINUS: c = '_';
-                case KeyEvent.VK_EQUALS: c = '+';
+                case KeyEvent.VK_BACK_QUOTE: c = '~'; break;
+                case KeyEvent.VK_COMMA: c = '<'; break;
+                case KeyEvent.VK_PERIOD: c = '>'; break;
+                case KeyEvent.VK_SLASH: c = '?'; break;
+                case KeyEvent.VK_SEMICOLON: c = ':'; break;
+                case KeyEvent.VK_QUOTE: c = '\"'; break;
+                case KeyEvent.VK_BRACELEFT: c = '{'; break;
+                case KeyEvent.VK_BRACERIGHT: c = '}'; break;
+                case KeyEvent.VK_BACK_SLASH: c = '|'; break;
+                case KeyEvent.VK_MINUS: c = '_'; break;
+                case KeyEvent.VK_EQUALS: c = '+'; break;
             }        } else {
             switch (key) {
-                case KeyEvent.VK_BACK_QUOTE: c = '`';
-                case KeyEvent.VK_COMMA: c = ',';
-                case KeyEvent.VK_PERIOD: c = '.';
-                case KeyEvent.VK_SLASH: c = '/';
-                case KeyEvent.VK_SEMICOLON: c = ';';
-                case KeyEvent.VK_QUOTE: c = '\'';
-                case KeyEvent.VK_BRACELEFT: c = '[';
-                case KeyEvent.VK_BRACERIGHT: c = ']';
-                case KeyEvent.VK_BACK_SLASH: c = '\\';
-                case KeyEvent.VK_MINUS: c = '-';
-                case KeyEvent.VK_EQUALS: c = '=';
+                case KeyEvent.VK_BACK_QUOTE: c = '`'; break;
+                case KeyEvent.VK_COMMA: c = ','; break;
+                case KeyEvent.VK_PERIOD: c = '.'; break;
+                case KeyEvent.VK_SLASH: c = '/'; break;
+                case KeyEvent.VK_SEMICOLON: c = ';'; break;
+                case KeyEvent.VK_QUOTE: c = '\''; break;
+                case KeyEvent.VK_BRACELEFT: c = '['; break;
+                case KeyEvent.VK_BRACERIGHT: c = ']'; break;
+                case KeyEvent.VK_BACK_SLASH: c = '\\'; break;
+                case KeyEvent.VK_MINUS: c = '-'; break;
+                case KeyEvent.VK_EQUALS: c = '='; break;
             }
         }
         return c == '\000' ? NO_CHAR : new char[] { c };