#include <msp/graphics/window.h>
#include <msp/graphics/display_priv.h>
#include <msp/graphics/window_priv.h>
-#include <msp/strings/format.h>
#include "keyboard.h"
#include "keys.h"
#ifndef WIN32
const char *str = XKeysymToString(key_to_sys(btn));
if(!str)
- return format("Key %d", btn);
+ return Device::get_button_name(btn);
return str;
#else
char buf[128];
unsigned scan = MapVirtualKey(key_to_sys(btn), MAPVK_VK_TO_VSC);
if(!GetKeyNameText(scan<<16, buf, sizeof(buf)))
- return format("Key %d", btn);
+ return Device::get_button_name(btn);
return buf;
#endif
}
#endif
#include <msp/graphics/window.h>
#include <msp/graphics/window_priv.h>
-#include <msp/strings/format.h>
#include "mouse.h"
namespace Msp {
case 5:
return "Wheel Down";
default:
- return format("Button %d", btn);
+ return Device::get_button_name(btn);
}
}
case 1:
return "Y axis";
default:
- return format("Axis %d", axis);
+ return Device::get_axis_name(axis);
};
}