Community
Participate
Working Groups
Build Identifier: 2.0.4 0338 When using more than one modifier in the keyboard file, it is parsed, but the keys are not send correctly to the KeyboardStrategy. A single compound key is send for all modifiers, instead of pressing each modifier alone. I replaced the Keystrokes.create(char) function with the following one which fixes the problem: static KeyStroke[] create(char ch) { KeyStroke keyStroke = defaultKeyboardLayout.keyStrokeFor(ch); ArrayList<KeyStroke> keyStrokes = new ArrayList<KeyStroke>(4); int modifiers = keyStroke.getModifierKeys(); if( (modifiers & SWT.CTRL ) != 0 ) { modifiers -= SWT.CTRL; keyStrokes.add(KeyStroke.getInstance(SWT.CTRL, 0)); } if( (modifiers & SWT.ALT ) != 0 ) { modifiers -= SWT.ALT; keyStrokes.add(KeyStroke.getInstance(SWT.ALT, 0)); } if( (modifiers & SWT.SHIFT ) != 0 ) { modifiers -= SWT.SHIFT; keyStrokes.add(KeyStroke.getInstance(SWT.SHIFT, 0)); } if( modifiers != 0 ) { // There are still more? keyStrokes.add(KeyStroke.getInstance(modifiers, 0)); } keyStrokes.add(KeyStroke.getInstance(0, keyStroke.getNaturalKey())); return keyStrokes.toArray(new KeyStroke[keyStrokes.size()]); } Sorry for not providing a patch. Reproducible: Always Steps to Reproduce: 1. Add a line "\ ctrl+alt+ß" to a file names DE.keyboard 2. Try to use typeText("\"). 3. It generates the chars 2\ instead of \
Bug #345156 is a generalization of this request. @Daniel: feel free to contribute support for german keyboard: http://wiki.eclipse.org/SWTBot/Keyboard_Layouts#Creating_keyboard_layouts *** This bug has been marked as a duplicate of bug 345156 ***
Actually, this bug is more a dup of bug 280562 which is about support Alt+Gr and multiple key modifiers *** This bug has been marked as a duplicate of bug 280562 ***