|
defineKey() registers a keystroke to invoke the func or the action. This function is assumed to be used with Swing.
keystroke is passed to KeyStroke::getKeyStroke(String) method, and a KeyStroke object is created.
condition is one of:
e.g.
defineKey(JTextPane(), "control alt K", function (e) println(e)) defineKey(JTextPane(), "released X", function (e) println(e))
|
getKeyStroke() makes a swing KeyStroke object. It is a shortcut to KeyStroke::getKeyStroke(String) method.