diff --git a/src/citra_qt/configuration/configure_dialog.cpp b/src/citra_qt/configuration/configure_dialog.cpp index 08c60ec8a..8d0d89c3b 100644 --- a/src/citra_qt/configuration/configure_dialog.cpp +++ b/src/citra_qt/configuration/configure_dialog.cpp @@ -22,6 +22,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry adjustSize(); ui->selectorList->setCurrentRow(0); + // Set up used key list synchronisation connect(ui->inputTab, &ConfigureInput::InputKeysChanged, ui->hotkeysTab, &ConfigureHotkeys::OnInputKeysChanged); connect(ui->hotkeysTab, &ConfigureHotkeys::HotkeysChanged, ui->inputTab, diff --git a/src/citra_qt/configuration/configure_hotkeys.h b/src/citra_qt/configuration/configure_hotkeys.h index 431d53fb2..960d9d572 100644 --- a/src/citra_qt/configuration/configure_hotkeys.h +++ b/src/citra_qt/configuration/configure_hotkeys.h @@ -28,6 +28,11 @@ public: void EmitHotkeysChanged(); + /** + * Populates the hotkey list widget using data from the provided registry. + * Called everytime the Configure dialog is opened. + * @param registry The HotkeyRegistry whose data is used to populate the list. + */ void Populate(const HotkeyRegistry& registry); public slots: @@ -43,6 +48,12 @@ private: std::unique_ptr ui; + /** + * List of keyboard keys currently registered to any of the 3DS inputs. + * These can't be bound to any hotkey. + * Synchronised with ConfigureInput via signal-slot. + */ QList input_keys_list; + QStandardItemModel* model; }; diff --git a/src/citra_qt/configuration/configure_input.h b/src/citra_qt/configuration/configure_input.h index 410415990..a122402aa 100644 --- a/src/citra_qt/configuration/configure_input.h +++ b/src/citra_qt/configuration/configure_input.h @@ -80,7 +80,11 @@ private: std::vector> device_pollers; - /// Keys currently registered as hotkeys + /** + * List of keys currently registered to hotkeys. + * These can't be bound to any input key. + * Synchronised with ConfigureHotkeys via signal-slot. + */ QList hotkey_list; /// A flag to indicate if keyboard keys are okay when configuring an input. If this is false, diff --git a/src/citra_qt/util/sequence_dialog/sequence_dialog.cpp b/src/citra_qt/util/sequence_dialog/sequence_dialog.cpp index 5a4cfb03f..48e7a82a7 100644 --- a/src/citra_qt/util/sequence_dialog/sequence_dialog.cpp +++ b/src/citra_qt/util/sequence_dialog/sequence_dialog.cpp @@ -23,6 +23,7 @@ SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) { SequenceDialog::~SequenceDialog() = default; QKeySequence SequenceDialog::GetSequence() { + // Only the first key is returned. The other 3, if present, are ignored. return QKeySequence(key_sequence->keySequence()[0]); }