Skip to content

Commit ad29d00

Browse files
author
Kyle Harrington
committed
Use default keybindings if no keybindings config file exists
1 parent 9ecb610 commit ad29d00

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/sc/iview/Controls.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ open class Controls(val sciview: SciView) {
197197
h.addKeyBinding("ruler: keep the button pressed and drag with the mouse", "E")
198198

199199
val configFile = File(System.getProperty("user.home")).resolve(".sciview.keybindings.yaml")
200-
inputHandler.readFromFile(configFile)
200+
if( configFile.exists() )
201+
inputHandler.readFromFile(configFile)
202+
else
203+
inputHandler.useDefaultBindings(configFile.absolutePath)
201204
}
202205

203206
/*

0 commit comments

Comments
 (0)