+#include "keyboard.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <msp/graphics/window_private.h>
-#include "keyboard.h"
+#include "keys.h"
#include "keys_private.h"
namespace Msp {
std::string Keyboard::get_button_name(unsigned btn) const
{
- if(btn==0)
+ if(btn==KEY_NONE)
return "None";
const char *str = XKeysymToString(key_to_sys(btn));
if(event.xevent.type==KeyPress)
{
char ch;
- if(XLookupString(const_cast<XKeyEvent *>(&event.xevent.xkey), &ch, 1, 0, 0))
+ if(XLookupString(const_cast<XKeyEvent *>(&event.xevent.xkey), &ch, 1, nullptr, nullptr))
// XLookupString always returns Latin-1
signal_character.emit(static_cast<unsigned char>(ch));
}