-
Bug
-
Resolution: Unresolved
-
P3
-
8, 11, 13, 14, 15
ADDITIONAL OS VERSION INFORMATION :
macOS 10.15.3
A DESCRIPTION OF THE PROBLEM :
Two "´" characters are entered in a text field instead of "´s" with "Finish" keyboard layout.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Go to "System Preferences -> Keyboard -> Input Sources" and add "Finish".
2. Compile and run the test case, whose code is provided below.
3. Press " ´ " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s".
The bug is reproduced if two "´" characters are entered in the text field.
Expected behavior: "´s" is typed.
---------- BEGIN SOURCE ----------
import javax.swing.*;
public class JTextAreaTest {
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame("Input bug");
frame.getContentPane().add(new JTextArea(20, 60));
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
});
}
}
---------- END SOURCE ----------
The bug is reproduced in the latest 8, 11, 14, and build 15-ea+14-561 versions.
7 events I receive during the typing "´s" (3 + 4):
java.awt.event.InputMethodEvent[INPUT_METHOD_TEXT_CHANGED, "" + "´", 0 characters committed, caret: TextHitInfo[0T], visible position: TextHitInfo[-1T]] on javax.swing.JTextArea[,0,0,720x320,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder@4b889eeb,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0],selectionColor=com.apple.laf.AquaImageFactory$SystemColorProxy[r=250,g=188,b=219],colums=60,columWidth=12,rows=20,rowHeight=16,word=false,wrap=false]
java.awt.event.KeyEvent[KEY_PRESSED,keyCode=129,keyText=Dead Acute,keyChar='´',keyLocation=KEY_LOCATION_UNKNOWN,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x10000b4] on frame0
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=61,keyText==,keyChar='´',keyLocation=KEY_LOCATION_STANDARD,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x10000b4] on frame0
java.awt.event.InputMethodEvent[INPUT_METHOD_TEXT_CHANGED, "´" + "", 1 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]] on javax.swing.JTextArea[,0,0,720x320,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder@4b889eeb,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0],selectionColor=com.apple.laf.AquaImageFactory$SystemColorProxy[r=250,g=188,b=219],colums=60,columWidth=12,rows=20,rowHeight=16,word=false,wrap=false]
java.awt.event.KeyEvent[KEY_PRESSED,keyCode=83,keyText=S,keyChar='´',keyLocation=KEY_LOCATION_STANDARD,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x10000b4] on frame0
java.awt.event.KeyEvent[KEY_TYPED,keyCode=0,keyText=Unknown keyCode: 0x0,keyChar='´',keyLocation=KEY_LOCATION_UNKNOWN,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x10000b4] on frame0
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=83,keyText=S,keyChar='s',keyLocation=KEY_LOCATION_STANDARD,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x53] on frame0
The issue is not reproduced in native apps (Notes, Safari, TextEdit)
macOS 10.15.3
A DESCRIPTION OF THE PROBLEM :
Two "´" characters are entered in a text field instead of "´s" with "Finish" keyboard layout.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Go to "System Preferences -> Keyboard -> Input Sources" and add "Finish".
2. Compile and run the test case, whose code is provided below.
3. Press " ´ " (on U.S. keyboard layout it is the [+] button just before the [delete] button), and then press "s".
The bug is reproduced if two "´" characters are entered in the text field.
Expected behavior: "´s" is typed.
---------- BEGIN SOURCE ----------
import javax.swing.*;
public class JTextAreaTest {
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame("Input bug");
frame.getContentPane().add(new JTextArea(20, 60));
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
});
}
}
---------- END SOURCE ----------
The bug is reproduced in the latest 8, 11, 14, and build 15-ea+14-561 versions.
7 events I receive during the typing "´s" (3 + 4):
java.awt.event.InputMethodEvent[INPUT_METHOD_TEXT_CHANGED, "" + "´", 0 characters committed, caret: TextHitInfo[0T], visible position: TextHitInfo[-1T]] on javax.swing.JTextArea[,0,0,720x320,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder@4b889eeb,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0],selectionColor=com.apple.laf.AquaImageFactory$SystemColorProxy[r=250,g=188,b=219],colums=60,columWidth=12,rows=20,rowHeight=16,word=false,wrap=false]
java.awt.event.KeyEvent[KEY_PRESSED,keyCode=129,keyText=Dead Acute,keyChar='´',keyLocation=KEY_LOCATION_UNKNOWN,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x10000b4] on frame0
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=61,keyText==,keyChar='´',keyLocation=KEY_LOCATION_STANDARD,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x10000b4] on frame0
java.awt.event.InputMethodEvent[INPUT_METHOD_TEXT_CHANGED, "´" + "", 1 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]] on javax.swing.JTextArea[,0,0,720x320,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder@4b889eeb,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0],selectionColor=com.apple.laf.AquaImageFactory$SystemColorProxy[r=250,g=188,b=219],colums=60,columWidth=12,rows=20,rowHeight=16,word=false,wrap=false]
java.awt.event.KeyEvent[KEY_PRESSED,keyCode=83,keyText=S,keyChar='´',keyLocation=KEY_LOCATION_STANDARD,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x10000b4] on frame0
java.awt.event.KeyEvent[KEY_TYPED,keyCode=0,keyText=Unknown keyCode: 0x0,keyChar='´',keyLocation=KEY_LOCATION_UNKNOWN,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x10000b4] on frame0
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=83,keyText=S,keyChar='s',keyLocation=KEY_LOCATION_STANDARD,rawCode=0,primaryLevelUnicode=0,scancode=0,extendedKeyCode=0x53] on frame0
The issue is not reproduced in native apps (Notes, Safari, TextEdit)
- links to
-
Review openjdk/jdk/7262