diff --git a/src/keycode.cpp b/src/keycode.cpp index d8faf9a..164331e 100644 --- a/src/keycode.cpp +++ b/src/keycode.cpp @@ -1,6 +1,7 @@ #include #include "keycode.h" -#include "getkey.h" +#include "keydialog.hpp" +#include const QString ktos( int keycode ) { @@ -8,7 +9,7 @@ const QString ktos( int keycode ) if (keycode == 0) return "[NO KEY]"; - QString xname = XKeysymToString(XKeycodeToKeysym(QX11Info::display(), keycode,0)); + QString xname = XKeysymToString( XkbKeycodeToKeysym( QX11Info::display(), keycode, 0, 0 ) ); //this section of code converts standard X11 keynames into much nicer names //which are prettier, fit the dialogs better, and are more readily understandable. @@ -90,7 +91,7 @@ KeyButton::KeyButton( QString name, int val, QWidget* parent, bool m, bool nowMo void KeyButton::onClick() { //when clicked, ask for a key! - int retValue = GetKey::getKey(buttonname, mouse, &mouseClicked, this->window()); + int retValue = KeyDialog::getKey(buttonname, mouse, &mouseClicked, this->window()); // -1 is a special value meaning that the window was simply // closed so we can ignore this if (retValue < 0) { diff --git a/src/quickset.cpp b/src/quickset.cpp index 0be9f78..a4daa13 100644 --- a/src/quickset.cpp +++ b/src/quickset.cpp @@ -1,5 +1,5 @@ #include "quickset.h" -#include "getkey.h" +#include "keydialog.hpp" //build the dialog QuickSet::QuickSet( JoyPad* jp, QWidget *parent) @@ -31,7 +31,7 @@ void QuickSet::jsevent(const js_event &msg ) { //go into setting mode and request a key/mousebutton setting = true; bool isMouse = false; - int code = GetKey::getKey(button->getName(), true, &isMouse, this); + int code = KeyDialog::getKey(button->getName(), true, &isMouse, this); setting = false; if (code >= 0) { @@ -49,7 +49,7 @@ void QuickSet::jsevent(const js_event &msg ) { //grab a keycode for that axis and that direction setting = true; bool isMouse = false; - int code = GetKey::getKey((msg.value >= 0 ? tr("%1, positive") : tr("%1, negative")).arg(axis->getName()), true, &isMouse, this); + int code = KeyDialog::getKey((msg.value >= 0 ? tr("%1, positive") : tr("%1, negative")).arg(axis->getName()), true, &isMouse, this); setting = false; //assign the key to the axis.