[PR #3461] [MERGED] Qt: enforce set order for kbm string mapping to prevent duplicate combo mappings #3488

Closed
opened 2026-02-27 22:03:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3461
Author: @rainmakerv3
Created: 8/26/2025
Status: Merged
Merged: 8/30/2025
Merged by: @squidbus

Base: mainHead: kbm-mapping-order


📝 Commits (4)

  • 09cb5fb enforce set order for kbm string mapping to prevent duplicate combo mappings
  • 2867c30 remove F keys for now
  • 268afbf re-add escape case to unmap
  • e57ec63 cleanup

📊 Changes

2 files changed (+181 additions, -153 deletions)

View changed files

📝 src/qt_gui/kbm_gui.cpp (+180 -152)
📝 src/qt_gui/kbm_gui.h (+1 -1)

📄 Description

The shadPS4 input engine doesn't allow duplicate mappings, so there is a check in the KBM remapping GUI to prevent this by checking for duplicate strings.

This however, can fail due to the fact that there is no enforced order for string insertion for combination mapping (for example, the GUI can either map "e,lcrtl" or "lctrl,e" when e and lcrtl are used in a combination mapping). Therefore, unique strings can exist for the same combination.

This PR changes the string container for mappings from a QSet to an indexed QMap so that all strings are always placed into the container in a specific order, preventing this from happening. The ordered strings look more organized as well


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3461 **Author:** [@rainmakerv3](https://github.com/rainmakerv3) **Created:** 8/26/2025 **Status:** ✅ Merged **Merged:** 8/30/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `kbm-mapping-order` --- ### 📝 Commits (4) - [`09cb5fb`](https://github.com/shadps4-emu/shadPS4/commit/09cb5fb1a70a3b0537f5da9e1e6b3dd192499ad2) enforce set order for kbm string mapping to prevent duplicate combo mappings - [`2867c30`](https://github.com/shadps4-emu/shadPS4/commit/2867c308ba3b2daf274eecf5196fd0c38c594842) remove F keys for now - [`268afbf`](https://github.com/shadps4-emu/shadPS4/commit/268afbf49e7827780c43432eca361921b88881e2) re-add escape case to unmap - [`e57ec63`](https://github.com/shadps4-emu/shadPS4/commit/e57ec6374ac47078cc5ce666120aefbb7ccc03cf) cleanup ### 📊 Changes **2 files changed** (+181 additions, -153 deletions) <details> <summary>View changed files</summary> 📝 `src/qt_gui/kbm_gui.cpp` (+180 -152) 📝 `src/qt_gui/kbm_gui.h` (+1 -1) </details> ### 📄 Description The shadPS4 input engine doesn't allow duplicate mappings, so there is a check in the KBM remapping GUI to prevent this by checking for duplicate strings. This however, can fail due to the fact that there is no enforced order for string insertion for combination mapping (for example, the GUI can either map "e,lcrtl" or "lctrl,e" when e and lcrtl are used in a combination mapping). Therefore, unique strings can exist for the same combination. This PR changes the string container for mappings from a QSet to an indexed QMap so that all strings are always placed into the container in a specific order, preventing this from happening. The ordered strings look more organized as well --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3488
No description provided.