Expected Behavior
On a Macbook with Mac OSX 10.15 I am able to enter curly braces and brackets. []{}. using the Option (or Alt) ⌥ key
Actual Behavior
With version 0.10.5 I am unable to enter curly braces and brackets , when I downgrade to 0.10.4 it works.
Reproducible Demo
Orgiinal code
public class Bug extends Application {
public void start(Stage primaryStage) {
StackPane root = new StackPane();
Scene scene = new Scene(root,400,400);
CodeArea codeArea = new CodeArea();
codeArea.setWrapText(true);
codeArea.setInputMethodRequests(new InputMethodRequestsObject());
codeArea.setOnInputMethodTextChanged(event -> {
String committed = event.getCommitted();
if (!committed.isEmpty()) {
codeArea.insertText(codeArea.getCaretPosition(), committed);
}
});
codeArea.setId("bibtexSourceCodeArea");
root.getChildren().add(codeArea);
primaryStage.setScene(scene);
primaryStage.show();
}
/* Work around for different input methods.
* https://github.com/FXMisc/RichTextFX/issues/146
*/
private static class InputMethodRequestsObject implements InputMethodRequests {
@Override
public String getSelectedText() {
return "";
}
@Override
public int getLocationOffset(int x, int y) {
return 0;
}
@Override
public void cancelLatestCommittedText() {
return;
}
@Override
public Point2D getTextLocation(int offset) {
return new Point2D(0, 0);
}
}
}
Environment info:
- RichTextFX Version: 0.10.5
- Operating System: OSX 10.15.7
- Java version: 14 + openjfx14
Current Workarounds
Downgrade to 0.10.4
Expected Behavior
On a Macbook with Mac OSX 10.15 I am able to enter curly braces and brackets.
[]{}. using theOption (or Alt) ⌥keyActual Behavior
With version 0.10.5 I am unable to enter curly braces and brackets , when I downgrade to 0.10.4 it works.
Reproducible Demo
Orgiinal code
Environment info:
Current Workarounds
Downgrade to 0.10.4