- ///
- 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);
-
- ///
- int print(char * buf, int maxlen) const;
-
- /// Look up a key in the keymap
- int lookup(KeySym key, unsigned mod, kb_sequence * seq);
+ /**
+ * 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
+ */
+ string::size_type bind(string const & seq, int action);
+
+ // Parse a bind file
+ bool kb_keymap::read(string const & bind_file);
+
+ /// print all available keysyms
+ string 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_PREFIX / LFUN_UNKNOWN_ACTION
+ */
+ int lookup(LyXKeySymPtr key,
+ key_modifier::state mod, kb_sequence * seq) const;