- ///
- kb_keymap() {
- size = 0;
- table = 0;
- }
- ///
- ~kb_keymap();
-
- /// Bind a key-sequence to an action
- /** Returns 0 on success. Otherwise, position in string where
- error occured. */
- int bind(char const * seq, int action);
+ /**
+ * Bind a key sequence to an action.
+ * @return 0 on success, or position in string seq where error
+ * occurs.
+ * See kb_sequence::parse for the syntax of the seq string
+ */
+ std::string::size_type bind(std::string const & seq, FuncRequest const & func);
+
+ // Parse a bind file
+ bool read(std::string const & bind_file);
+
+ /// print all available keysyms
+ docstring const print() const;
+
+ /**
+ * Look up a key press in the keymap.
+ * @param key the keysym
+ * @param mod the modifiers
+ * @param seq the current key sequence so far
+ * @return the action / LFUN_COMMAND_PREFIX / LFUN_UNKNOWN_ACTION
+ */
+ FuncRequest const &
+ lookup(LyXKeySymPtr key,
+ key_modifier::state mod, kb_sequence * seq) const;