+std::string Keyboard::get_button_name(unsigned btn) const
+{
+#ifndef WIN32
+ KeySym ksym=XKeycodeToKeysym(window.get_display().get_display(), btn, 0);
+ return XKeysymToString(ksym);
+#else
+ char buf[128];
+ if(!GetKeyNameText(btn<<16, buf, sizeof(buf)))
+ return format("Key %d", btn);
+ return buf;
+#endif
+}
+