         continue
       }
 
+      fn(identifier, menuItem)
+    }
+  }
+
+  private func initMenuItemsBindings() {
+    self.traverseMenuItems { identifier, menuItem in
       menuItem.bind(
         NSBindingName("keyEquivalent"),
         to: self.shortcutsDefaultsController,

extension ShortcutsPref {

  @objc func resetToDefault(_ sender: NSButton) {
    stdoutLog.debug("Reset to default!")
    stdoutLog.debug(
      self.shortcutsDefaultsController.defaults
        .dictionaryRepresentation()["com.qvacua.vimr.menuitems.edit.copy"]
    )
  }
}


                           withKeyPath: "selectionIndexPaths")
  }

  private func traverseMenuItems(with fn: (String, NSMenuItem) -> Void) {
    var queue = self.shortcutItemsRoot.children ?? []
    while (!queue.isEmpty) {
      guard let item = queue.popLast() else { break }
