Skip to content

Commit

Permalink
Merge pull request #369 from scenerygraphics/default-keybindings
Browse files Browse the repository at this point in the history
 Use default keybindings if no keybindings config file exists
  • Loading branch information
kephale authored Mar 24, 2021
2 parents 9ecb610 + ad29d00 commit 72d5346
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/sc/iview/Controls.kt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ open class Controls(val sciview: SciView) {
h.addKeyBinding("ruler: keep the button pressed and drag with the mouse", "E")

val configFile = File(System.getProperty("user.home")).resolve(".sciview.keybindings.yaml")
inputHandler.readFromFile(configFile)
if( configFile.exists() )
inputHandler.readFromFile(configFile)
else
inputHandler.useDefaultBindings(configFile.absolutePath)
}

/*
Expand Down

0 comments on commit 72d5346

Please sign in to comment.