* ======================================================
*
* 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.
if (curmap) {
return curmap->lookup(key, mod, this);
}
-
+
return LFUN_UNKNOWN_ACTION;
}
++i;
if (i >= s.length())
break;
-
+
if (i + 1 < s.length() && s[i + 1] == '-') {
switch (s[i]) {
case 's': case '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]
return j;
}
i = j;
-
+
addkey(key, mod, nmod);
mod = 0;
}
}
-
+
// empty sequence?
if (!length_)
return 0;
{
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
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);
}