- int print(string & buf, bool when_defined = false) const;
-
- ///
- int printOptions(string & buf) const;
-
- /// Make length negative to mark the sequence as deleted
- void delseq();
-
- ///
- char getiso();
-
- ///
- unsigned long getsym();
-
- ///
- void reset();
-
- ///
- int parse(char const * s);
-
- /// Keymap to use if a new sequence is starting
- kb_keymap * stdmap;
-
- /// Keymap to use for the next key
- kb_keymap * curmap;
-
- /// Array holding the current key sequence
- /** If sequence[length-1] < 0xff it can be used as ISO8859 char */
- unsigned int * sequence;
-
+ struct kb_key {
+ /// Keysym
+ LyXKeySymPtr code;
+
+ /// Modifier masks
+ modifier_pair mod;
+
+ /// Keymap for prefix keys
+ boost::shared_ptr<kb_keymap> table;
+
+ /// Action for !prefix keys
+ FuncRequest func;
+ };
+
+ /**
+ * Define an action for a key sequence.
+ * @param r internal recursion level
+ */
+ void defkey(kb_sequence * seq, FuncRequest const & func,
+ unsigned int r = 0);
+
+ /// Returns a string of the given key
+ std::string const printKey(kb_key const & key) const;
+
+ /**
+ * Given an action, find all keybindings
+ * @param func the action
+ * @param prefix a sequence to prepend the results
+ */
+ Bindings findbindings(FuncRequest const & func,
+ kb_sequence const & prefix) const;
+
+ /// is the table empty ?
+ bool empty() const {
+ return table.empty();
+ }