+int
+Keyboard::reset_bindings ()
+{
+ if (Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
+
+ string new_path = user_keybindings_path;
+ new_path += ".old";
+
+ if (::g_rename (user_keybindings_path.c_str(), new_path.c_str())) {
+ error << string_compose (_("Cannot rename your own keybinding file (%1)"), strerror (errno)) << endmsg;
+ return -1;
+ }
+ }
+
+ {
+ PBD::Unwinder<bool> uw (can_save_keybindings, false);
+ setup_keybindings ();
+ }
+
+ return 0;
+}