diff -r 6e5a6ffb69ae javafx-ui-common/src/javafx/embed/swt/SWTEvents.java --- a/javafx-ui-common/src/javafx/embed/swt/SWTEvents.java Thu Oct 20 17:17:12 2011 -0400 +++ b/javafx-ui-common/src/javafx/embed/swt/SWTEvents.java Fri Nov 04 21:14:51 2011 -0400 @@ -113,84 +113,92 @@ {0x27 /*KeyEvent.VK_RIGHT*/, SWT.ARROW_RIGHT}, {0x28 /*KeyEvent.VK_DOWN*/, SWT.ARROW_DOWN}, - //TODO - how are these mapped? (SWT uses the unaffected key)? // Misc 2 -// {KeyEvent.VK_COMMA = 0x2C; // ',' -// {KeyEvent.VK_MINUS = 0x2D; // '-' -// {KeyEvent.VK_PERIOD = 0x2E; // '.' -// {KeyEvent.VK_SLASH = 0x2F; // '/' -// {KeyEvent.VK_SEMICOLON = 0x3B; // ';' -// {KeyEvent.VK_EQUALS = 0x3D; // '=' -// {KeyEvent.VK_OPEN_BRACKET = 0x5B; // '[' -// {KeyEvent.VK_BACK_SLASH = 0x5C; // '\' -// {KeyEvent.VK_CLOSE_BRACKET = 0x5D; // ']' -// {KeyEvent.VK_MULTIPLY = 0x6A; // '*' -// {KeyEvent.VK_ADD = 0x6B; // '+' -// {KeyEvent.VK_SEPARATOR = 0x6C; -// {KeyEvent.VK_SUBTRACT = 0x6D; -// {KeyEvent.VK_DECIMAL = 0x6E; -// {KeyEvent.VK_DIVIDE = 0x6F; -// {KeyEvent.VK_AMPERSAND = 0x96; -// {KeyEvent.VK_ASTERISK = 0x97; -// {KeyEvent.VK_DOUBLE_QUOTE = 0x98; // '"' -// {KeyEvent.VK_LESS = 0x99; // '<' -// {KeyEvent.VK_GREATER = 0xa0; // '>' -// {KeyEvent.VK_BRACELEFT = 0xa1; // '{' -// {KeyEvent.VK_BRACERIGHT = 0xa2; // '}' -// {KeyEvent.VK_BACK_QUOTE = 0xC0; // '`' -// {KeyEvent.VK_QUOTE = 0xDE; // ''' -// {KeyEvent.VK_AT = 0x0200; // '@' -// {KeyEvent.VK_COLON = 0x0201; // ':' -// {KeyEvent.VK_CIRCUMFLEX = 0x0202; // '^' -// {KeyEvent.VK_DOLLAR = 0x0203; // '$' -// {KeyEvent.VK_EURO_SIGN = 0x0204; -// {KeyEvent.VK_EXCLAMATION = 0x0205; // '!' -// {KeyEvent.VK_INV_EXCLAMATION = 0x0206; -// {KeyEvent.VK_LEFT_PARENTHESIS = 0x0207; // '(' -// {KeyEvent.VK_NUMBER_SIGN = 0x0208; // '#' -// {KeyEvent.VK_PLUS = 0x0209; // '+' -// {KeyEvent.VK_RIGHT_PARENTHESIS = 0x020A; // ')' -// {KeyEvent.VK_UNDERSCORE = 0x020B; // '_' -// -// // Numeric keys -// {KeyEvent.VK_0 = 0x30; // '0' -// {KeyEvent.VK_1 = 0x31; // '1' -// {KeyEvent.VK_2 = 0x32; // '2' -// {KeyEvent.VK_3 = 0x33; // '3' -// {KeyEvent.VK_4 = 0x34; // '4' -// {KeyEvent.VK_5 = 0x35; // '5' -// {KeyEvent.VK_6 = 0x36; // '6' -// {KeyEvent.VK_7 = 0x37; // '7' -// {KeyEvent.VK_8 = 0x38; // '8' -// {KeyEvent.VK_9 = 0x39; // '9' -// -// // Alpha keys -// {KeyEvent.VK_A = 0x41; // 'A' -// {KeyEvent.VK_B = 0x42; // 'B' -// {KeyEvent.VK_C = 0x43; // 'C' -// {KeyEvent.VK_D = 0x44; // 'D' -// {KeyEvent.VK_E = 0x45; // 'E' -// {KeyEvent.VK_F = 0x46; // 'F' -// {KeyEvent.VK_G = 0x47; // 'G' -// {KeyEvent.VK_H = 0x48; // 'H' -// {KeyEvent.VK_I = 0x49; // 'I' -// {KeyEvent.VK_J = 0x4A; // 'J' -// {KeyEvent.VK_K = 0x4B; // 'K' -// {KeyEvent.VK_L = 0x4C; // 'L' -// {KeyEvent.VK_M = 0x4D; // 'M' -// {KeyEvent.VK_N = 0x4E; // 'N' -// {KeyEvent.VK_O = 0x4F; // 'O' -// {KeyEvent.VK_P = 0x50; // 'P' -// {KeyEvent.VK_Q = 0x51; // 'Q' -// {KeyEvent.VK_R = 0x52; // 'R' -// {KeyEvent.VK_S = 0x53; // 'S' -// {KeyEvent.VK_T = 0x54; // 'T' -// {KeyEvent.VK_U = 0x55; // 'U' -// {KeyEvent.VK_V = 0x56; // 'V' -// {KeyEvent.VK_W = 0x57; // 'W' -// {KeyEvent.VK_X = 0x58; // 'X' -// {KeyEvent.VK_Y = 0x59; // 'Y' -// {KeyEvent.VK_Z = 0x5A; // 'Z' + //TODO - suspect this only works for English keyboard + {0x2C /*KeyEvent.VK_COMMA*/, ','}, // ',' + {0x2D /*KeyEvent.VK_MINUS*/, '-'}, // '-' + {0x2E /*KeyEvent.VK_PERIOD*/, '.'}, // '.' + {0x2F /*KeyEvent.VK_SLASH*/, '/'}, // '/' + {0x3B /*KeyEvent.VK_SEMICOLON*/, ';'}, // ';' + {0x3D /*KeyEvent.VK_EQUALS*/, '='}, // '=' + {0x5B /*KeyEvent.VK_OPEN_BRACKET*/, '['}, // '[' + {0x5C /*KeyEvent.VK_BACK_SLASH*/, '\\'}, // '\' + {0x5D /*KeyEvent.VK_CLOSE_BRACKET*/, ']'}, // ']' + + // Numeric key pad keys + {0x6A /*KeyEvent.VK_MULTIPLY*/, SWT.KEYPAD_MULTIPLY}, // '*' + {0x6B /*KeyEvent.VK_ADD*/, SWT.KEYPAD_ADD}, // '+' +// {0x6C /*KeyEvent.VK_SEPARATOR*/, SWT.???}, + {0x6D /*KeyEvent.VK_SUBTRACT*/, SWT.KEYPAD_SUBTRACT}, + {0x6E /*KeyEvent.VK_DECIMAL*/, SWT.KEYPAD_DECIMAL}, + {0x6F /*KeyEvent.VK_DIVIDE*/, SWT.KEYPAD_DIVIDE}, +// {0x?? /*KeyEvent.VK_????*/, SWT.KEYPAD_EQUAL}, +// {0x?? /*KeyEvent.VK_????*/, SWT.KEYPAD_CR}, + + {0x96 /*KeyEvent.VK_AMPERSAND*/, '@'}, + {0x97 /*KeyEvent.VK_ASTERISK*/, '*'}, + + {0x98 /*KeyEvent.VK_DOUBLE_QUOTE*/, '"'}, // '"' + {0x99 /*KeyEvent.VK_LESS*/, '<'}, // '<' + {0xa0 /*KeyEvent.VK_GREATER*/, '>'}, // '>' + {0xa1 /*KeyEvent.VK_BRACELEFT*/, '{'}, // '{' + {0xa2 /*KeyEvent.VK_BRACERIGHT*/, '}'}, // '}' + {0xC0 /*KeyEvent.VK_BACK_QUOTE*/, '`'}, // '`' + {0xDE /*KeyEvent.VK_QUOTE*/, '\''}, // ''' + {0x0200 /*KeyEvent.VK_AT*/, '@'}, // '@' + {0x0201 /*KeyEvent.VK_COLON*/, ':'}, // ':' + {0x0202 /*KeyEvent.VK_CIRCUMFLEX*/, '^'}, // '^' + {0x0203 /*KeyEvent.VK_DOLLAR*/, '$'}, // '$' +// {KeyEvent.VK_EURO_SIGN, 0x0204}, + {0x0205 /*KeyEvent.VK_EXCLAMATION*/, '!'}, // '!' +// {KeyEvent.VK_INV_EXCLAMATION, 0x0206}, + {0x0207 /*KeyEvent.VK_LEFT_PARENTHESIS*/, '('}, // '(' + {0x0208 /*KeyEvent.VK_NUMBER_SIGN*/, '#'}, // '#' + {0x0209 /*KeyEvent.VK_PLUS*/, '+'}, // '+' + {0x020A /*KeyEvent.VK_RIGHT_PARENTHESIS*/, ')'}, // ')' + {0x020B /*KeyEvent.VK_UNDERSCORE*/, '_'}, // '_' + + // Numeric keys + //TODO - suspect this only works for English keyboard + {0x30 /*KeyEvent.VK_0*/, '0'}, // '0' + {0x31 /*KeyEvent.VK_1*/, '1'}, // '1' + {0x32 /*KeyEvent.VK_2*/, '2'}, // '2' + {0x33 /*KeyEvent.VK_3*/, '3'}, // '3' + {0x34 /*KeyEvent.VK_4*/, '4'}, // '4' + {0x35 /*KeyEvent.VK_5*/, '5'}, // '5' + {0x36 /*KeyEvent.VK_6*/, '6'}, // '6' + {0x37 /*KeyEvent.VK_7*/, '7'}, // '7' + {0x38 /*KeyEvent.VK_8*/, '8'}, // '8' + {0x39 /*KeyEvent.VK_9*/, '9'}, // '9' + + // Alpha keys + //TODO - suspect this only works for English keyboard + {0x41 /*KeyEvent.VK_A*/, 'a'}, // 'A' + {0x42 /*KeyEvent.VK_B*/, 'b'}, // 'B' + {0x43 /*KeyEvent.VK_C*/, 'c'}, // 'C' + {0x44 /*KeyEvent.VK_D*/, 'd'}, // 'D' + {0x45 /*KeyEvent.VK_E*/, 'e'}, // 'E' + {0x46 /*KeyEvent.VK_F*/, 'f'}, // 'F' + {0x47 /*KeyEvent.VK_G*/, 'g'}, // 'G' + {0x48 /*KeyEvent.VK_H*/, 'h'}, // 'H' + {0x49 /*KeyEvent.VK_I*/, 'i'}, // 'I' + {0x4A /*KeyEvent.VK_J*/, 'j'}, // 'J' + {0x4B /*KeyEvent.VK_K*/, 'k'}, // 'K' + {0x4C /*KeyEvent.VK_L*/, 'l'}, // 'L' + {0x4D /*KeyEvent.VK_M*/, 'm'}, // 'M' + {0x4E /*KeyEvent.VK_N*/, 'n'}, // 'N' + {0x4F /*KeyEvent.VK_O*/, 'o'}, // 'O' + {0x50 /*KeyEvent.VK_P*/, 'p'}, // 'P' + {0x51 /*KeyEvent.VK_Q*/, 'q'}, // 'Q' + {0x52 /*KeyEvent.VK_R*/, 'r'}, // 'R' + {0x53 /*KeyEvent.VK_S*/, 's'}, // 'S' + {0x54 /*KeyEvent.VK_T*/, 't'}, // 'T' + {0x55 /*KeyEvent.VK_U*/, 'u'}, // 'U' + {0x56 /*KeyEvent.VK_V*/, 'v'}, // 'V' + {0x57 /*KeyEvent.VK_W*/, 'w'}, // 'W' + {0x58 /*KeyEvent.VK_X*/, 'x'}, // 'X' + {0x59 /*KeyEvent.VK_Y*/, 'y'}, // 'Y' + {0x5A /*KeyEvent.VK_Z*/, 'z'}, // 'Z' // Numpad keys {0x60 /*KeyEvent.VK_NUMPAD0*/, SWT.KEYPAD_0},