+
+ /// returns the function bound to this key sequence, or
+ /// FuncRequest::unknown if no binding exists for it.
+ /// @param r an internal recursion counter
+ // FIXME Surely there's a better way to do that?
+ FuncRequest getBinding(KeySequence const & seq, unsigned int r = 0);
+
+ /// clear all bindings
+ void clear();
+
+ /** Parse a bind file. If a valid unbind_map is given, put \unbind
+ * bindings to a separate KeyMap. This is used in the Shortcut preference
+ * dialog where main and user bind files are loaded separately so \unbind
+ * in user.bind can not nullify \bind in the master bind file.
+ *
+ * @param bind_file bind file
+ * @param unbind_map pointer to a KeyMap that holds \unbind bindings
+ * @param rt how to respond if the file can't be found
+ */
+ bool read(std::string const & bind_file, KeyMap * unbind_map = 0,
+ BindReadType rt = Default);
+
+ /** write to a bind file.
+ * @param append append to the bind_file instead of overwrite it
+ * @param unbind use \unbind instead of \bind, indicating this KeyMap
+ * actually record unbind maps.
+ */
+ void write(std::string const & bind_file, bool append, bool unbind = false) const;