]> git.lyx.org Git - lyx.git/blobdiff - src/kbsequence.C
fix typo that put too many include paths for most people
[lyx.git] / src / kbsequence.C
index db1759489895f069edde5cfcf784c1e6a897b0e2..fa93e556b7789fd748adfe51819bc1ec2e762d7e 100644 (file)
@@ -2,7 +2,7 @@
  * ======================================================
  *
  *           LyX, The Document Processor
- *     
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
 #include "commandtags.h"
 #include "debug.h"
 
+
+using std::vector;
 using std::endl;
+using std::hex;
+using std::dec;
+
 
 // The only modifiers that we handle. We want to throw away things
 // like NumLock.
@@ -48,7 +53,7 @@ int kb_sequence::addkey(unsigned int key, unsigned int mod, unsigned int nmod)
        if (curmap) {
                return curmap->lookup(key, mod, this);
        }
-       
+
        return LFUN_UNKNOWN_ACTION;
 }
 
@@ -65,7 +70,7 @@ string::size_type kb_sequence::parse(string const & s)
                        ++i;
                if (i >= s.length())
                        break;
-               
+
                if (i + 1 < s.length() && s[i + 1] == '-') {
                        switch (s[i]) {
                        case 's': case 'S':
@@ -106,7 +111,7 @@ string::size_type kb_sequence::parse(string const & s)
                        string::size_type j = i;
                        for (; j < s.length() && s[j] != ' '; ++j)
                                tbuf += s[j];    // (!!!check bounds :-)
-                       
+
                        KeySym key = XStringToKeysym(tbuf.c_str());
                        if (key == NoSymbol) {
                                lyxerr[Debug::KBMAP]
@@ -115,12 +120,12 @@ string::size_type kb_sequence::parse(string const & s)
                                return j;
                        }
                        i = j;
-                       
+
                        addkey(key, mod, nmod);
                        mod = 0;
                }
        }
-       
+
        // empty sequence?
        if (!length_)
                return 0;
@@ -134,10 +139,10 @@ string const kb_sequence::print() const
 {
        string buf;
 
-       if (deleted_)
-               return buf;
-       
-       for (std::vector<unsigned int>::size_type i = 0; i < length_; ++i) {
+       //if (deleted_)
+       //      return buf;
+
+       for (vector<unsigned int>::size_type i = 0; i < length_; ++i) {
                buf += kb_keymap::printKeysym(sequence[i], modifiers[i] & 0xffff);
 
                // append a blank
@@ -182,9 +187,9 @@ char kb_sequence::getiso() const
        unsigned int const c = getsym();
 
        lyxerr[Debug::KBMAP] << "Raw keysym: "
-                            << std::hex << c << std::dec << endl;
+                            << hex << c << dec << endl;
        lyxerr[Debug::KBMAP] << "byte 3: "
-                            << std::hex << (c & 0xff00) << std::dec
+                            << hex << (c & 0xff00) << dec
                             << endl;
        return kb_keymap::getiso(c);
 }