Skip to content

Commit

Permalink
Use default keybindings if no keybindings config file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Harrington committed Mar 24, 2021
1 parent 9ecb610 commit ad29d00
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 ad29d00

Please sign in to comment.