val textArea = new TextArea(text) {
addEventFilter(KeyEvent.ANY, (event: KeyEvent) => {
if (event.getEventType == KeyEvent.KEY_PRESSED && event.getCode == KeyCode.ENTER) {
event.consume()
if (event.isAltDown)
insertText(getCaretPosition,"\n")
}
})
}
Wie deaktiviere ich den Ton, wenn ich ALT+ ENTER in javafx.scene.control.TextArea drücke?