atarw / material-ui-swing

A modern, Material Design UI for Java Swing
MIT License
654 stars 86 forks source link

JTextArea doesn't react to command keys anymore #21

Closed wiese42 closed 6 years ago

wiese42 commented 6 years ago

WIth this LaF active, nothing happens in JTextArea, if you press the arrow keys, backspace, and all the other command keys. Could't figure out the reason for that.

wiese42 commented 6 years ago

Just found out the reason for it. You need to set

UIManager.put("TextArea.focusInputMap", multilineInputMap) UIManager.put("TextPane.focusInputMap", multilineInputMap) UIManager.put("EditorPane.focusInputMap", multilineInputMap)

See MetalLookAndFeel.java for some inspiration on how to initialize the inputMap.

atarw commented 6 years ago

Thank you for the pull request :D I'll assume this issue is closed