Replace usage of GetKey in favor for KeyDialog
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include <QX11Info>
|
||||
#include "keycode.h"
|
||||
#include "getkey.h"
|
||||
#include "keydialog.hpp"
|
||||
#include <X11/XKBlib.h>
|
||||
|
||||
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) {
|
||||
|
@ -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.
|
||||
|
Reference in New Issue
Block a user