Simulator key/mouse mapping improvements (#4175)
* [simulator] Keyboard and mouse control adjustments: ~ Make kay/mouse navigation more consistent between radios and ensure keyboard events are always properly detected (eg. after clicking on a control); * Fix mouse wheel direction for rotary encoder emulation (fixes https://github.com/opentx/opentx/issues/4160); * Fix page up/down buttons on Horus (also #4160); ~ Horus rotary encoder can now be controlled with +/- keys (also keeps X/C, otherwise supersedes https://github.com/opentx/opentx/pull/4087 ); ~ DEL key now another alternative for ESC/BKSP (brings all controls to number pad); ~ "=" key now acts same as "+" key (+ requires SHIFT in main row on most US keyboards); * Fix controls direction when using mouse wheel over RC switches; + Add help text showing keyboard mappings for each radio type (activate on F1 key). * [simulator] Enable mouse wheel scrolling on radios w/out a rotary encoder (acts as +/- keys on X9D, PU/DN keys on 9X).
This commit is contained in:
committed by
Bertrand Songis
parent
1d3b6721c6
commit
5bf7a6c28d
@@ -77,6 +77,7 @@ class SimulatorDialog : public QDialog
|
||||
virtual void traceCallback(const char * text);
|
||||
|
||||
protected:
|
||||
typedef QPair<QString, QString> keymapHelp_t;
|
||||
template <class T> void initUi(T * ui);
|
||||
virtual void setLightOn(bool enable) { }
|
||||
virtual void updateBeepButton() { }
|
||||
@@ -98,6 +99,7 @@ class SimulatorDialog : public QDialog
|
||||
VirtualJoystickWidget *vJoyRight;
|
||||
QTimer *timer;
|
||||
QString windowName;
|
||||
QVector<keymapHelp_t> keymapHelp;
|
||||
unsigned int backLight;
|
||||
bool lightOn;
|
||||
int switches;
|
||||
@@ -164,6 +166,7 @@ class SimulatorDialog : public QDialog
|
||||
void openDebugOutput();
|
||||
void onDebugOutputClose();
|
||||
void luaReload();
|
||||
void showHelp();
|
||||
|
||||
#ifdef JOYSTICKS
|
||||
void onjoystickAxisValueChanged(int axis, int value);
|
||||
|
||||
Reference in New Issue
Block a user