*/
#include <config.h>
-#include <gtkmm.h>
-#include <gdk/gdkkeysyms.h>
+// Too hard to make concept checks work with this file
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCPP_CONCEPT_CHECKS
+#endif
+
#include "GLyXKeySym.h"
+#include "kbmap.h"
+
+#include "support/lstrings.h"
+
+#include <gtkmm.h>
+#include <gdk/gdkkeysyms.h>
using std::string;
}
+// Produce a human readable version (eg "Ctrl+N")
+string const GLyXKeySym::print(key_modifier::state mod) const
+{
+ string buf;
+
+ if (mod & key_modifier::ctrl)
+ buf += "Ctrl+";
+ if (mod & key_modifier::shift)
+ buf += "Shift+";
+ if (mod & key_modifier::alt)
+ buf += "Alt+";
+
+ // Uppercase the first letter, for Ctrl+N rather than Ctrl+n,
+ // and for Ctrl+Greater rather than Ctrl+GREATER
+ string symname = getSymbolName();
+ if (!symname.empty()) {
+ symname[0] = lyx::support::uppercase(symname[0]);
+ buf += symname;
+ }
+
+ return buf;
+}
+
+
bool operator==(LyXKeySym const & k1, LyXKeySym const & k2)
{
return static_cast<GLyXKeySym const &>(k1).getKeyval()