Here is what I thought would work based on javafx examples I've seen, but I'm getting an error on the (ctlA.match(ke)) pointing to "match" and saying "identifier expected but 'match' found." Any links to scalafx examples that have complex KeyEvent processing would be appreciated.
import scalafx.Includes._
import scalafx.application.JFXApp
import scalafx.application.JFXApp.PrimaryStage
import scalafx.scene.input.{KeyCode, KeyCombination, KeyCodeCombination, KeyEvent}
import scalafx.scene.Scene
import scalafx.stage.Stage
object Main extends JFXApp {
val ctlA = new KeyCodeCombination(KeyCode.A, KeyCombination.ControlDown)
stage = new PrimaryStage {
scene = new Scene {
onKeyPressed = { ke =>
if (ctlA.match(ke))
println("Matches ^A")
else
println("No match")
}
}
}
}