Only try to click the focused button when pressing enter.

It makes no sense when pressing the escape button.
Add option to lock databases after user inactivity.

Closes #62
Disable settings spinboxes by default.

They get enabled when the corresponding checkboxes are checked.