X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fkbsequence.h;h=e00382d34edb58e13938541f940c2fe2eef5e22c;hb=98c966c64594611e469313314abd1e59524adb4a;hp=255adb2d298f7d86f81f70084391fbc4df09b72c;hpb=159544464a4e02a702aec062257fc6cce3ec7bfd;p=lyx.git diff --git a/src/kbsequence.h b/src/kbsequence.h index 255adb2d29..e00382d34e 100644 --- a/src/kbsequence.h +++ b/src/kbsequence.h @@ -15,8 +15,6 @@ #include #include "LString.h" -#include "commandtags.h" - class kb_keymap; /// Holds a key sequence and the current and standard keymaps @@ -28,7 +26,7 @@ public: kb_sequence(kb_keymap * std, kb_keymap * cur) : stdmap(std), curmap(cur), length_(0), deleted_(false) {} - + /** * Add a key to the key sequence and look it up in the curmap @@ -37,7 +35,7 @@ public: * @param nmod which modifiers to mask out for equality test * @return the action matching this key sequence or LFUN_UNKNOWN_ACTION */ - kb_action addkey(unsigned int key, unsigned int mod, unsigned int nmod = 0); + int addkey(unsigned int key, unsigned int mod, unsigned int nmod = 0); /** * Add a sequence of keys from a string to the sequence @@ -48,28 +46,28 @@ public: * Prefixes are S-, C-, M- for shift, control, meta */ string::size_type parse(string const & s); - + /** * Return the current sequence as a string. * @see parse() */ string const print() const; - + /** * Return the current sequence and available options as * a string. No options are added if no curmap kb map exists. */ string const printOptions() const; - + /// Mark the sequence as deleted. void mark_deleted(); /// Return the ISO value of the last keysym in sequence, or 0 char getiso() const; - + /// Reset sequence to become "deleted" void reset(); - + /// clear in full void clear(); @@ -84,23 +82,23 @@ public: /// Keymap to use if a new sequence is starting kb_keymap * stdmap; - + /// Keymap to use for the next key kb_keymap * curmap; - + private: /// get the keysym of last in sequence unsigned int getsym() const; - + /** * Array holding the current key sequence. * If sequence[length-1] < 0xff it can be used as ISO8859 char */ std::vector sequence; - + /// modifiers for keys in the sequence std::vector modifiers; - + /// Current length of key sequence std::vector::size_type length_;