* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
- * Copyright 1995-2000 The LyX Team.
+ * Copyright 1995-2001 The LyX Team.
*
* ====================================================== */
#include <config.h>
-#include <cstring>
+//#include <cstring>
#include <X11/Xlib.h>
#ifdef __GNUG__
// Finds a key for a keyaction, if possible
-string const kb_keymap::findbinding(int act) const
+string const kb_keymap::findbinding(int act, string const & prefix) const
{
string res;
if (table.empty()) return res;
for (Table::const_iterator cit = table.begin();
cit != end; ++cit) {
if ((*cit).table.get()) {
- string suffix = (*cit).table->findbinding(act);
- suffix = strip(suffix, ' ');
- suffix = strip(suffix, ']');
- suffix = frontStrip(suffix, '[');
- if (!suffix.empty()) {
- res += "[" + keyname((*cit)) + " "
- + suffix + "] ";
- }
+ res += (*cit).table->findbinding(act,
+ prefix
+ + keyname((*cit))
+ + " ");
} else if ((*cit).action == act) {
res += "[";
- res += keyname((*cit));
+ res += prefix + keyname((*cit));
res += "] ";
}
}