microsoft / microsoft/PowerToys
[Keyboard Manager] Bidirectional Alt/Win remapping causes both keys to trigger the Windows key
- Dominant language
- C
- Stars
- 139k
- Forks
- 8.6k
- PR merge metrics
- PR metrics pending
Description
### Microsoft PowerToys version
0.100.2
### Installation method
Microsoft Store
### Area(s) with issue?
General
### Steps to reproduce
1. Open PowerToys.
2. Open **Keyboard Manager**.
3. Select **Remap a key**.
4. Add the following mapping:
- **Alt (Left) → Win (Left)**
5. Add the reverse mapping:
- **Win (Left) → Alt (Left)**
6. Make sure both mappings are enabled.
7. Press the physical **Alt (Left)** key.
8. Press the physical **Win (Left)** key.
The issue occurs when both reverse mappings are enabled at the same time.
I am using an Apple Magic Keyboard on Windows and am trying to swap the positions of the left Option/Alt key and the left Command/Windows key.
### ✔️ Expected Behavior
The two keys should be swapped independently:
- Pressing the physical **Alt (Left)** key should generate **Win (Left)**.
- Pressing the physical **Win (Left)** key should generate **Alt (Left)**.
The output generated by one remapping rule should not be processed again by another remapping rule.
In other words, Keyboard Manager should treat the original physical key event as the source of the remapping and should not create recursive, chained, or circular remapping behavior.
This configuration should allow normal use of both Windows-key and Alt-key shortcuts after the keys have been swapped.
### ❌ Actual Behavior
When both mappings are enabled, pressing either physical key triggers the Windows key behavior.
Observed behavior:
- Pressing **Alt (Left)** opens the Windows Start menu.
- Pressing **Win (Left)** also opens the Windows Start menu.
As a result, both physical keys effectively behave as **Win (Left)**, and the **Alt (Left)** behavior is no longer available.
This prevents normal use of Alt-based shortcuts such as:
- Alt + Tab
- Alt + F4
- Alt-based application shortcuts
- Menu navigation shortcuts
It appears that the remapped output may be evaluated again against the reverse mapping, or that bidirectional mappings are not being handled as an atomic key swap.
### Upload Bug Report ZIP-file
[2026-08-05 10 54 00.png](https://github.com/user-attachments/assets/dd182818-3d23-4dde-a381-872d3b99c19e)
### Additional Information
windows 11 pro
korean
### Other Software
_No response_
Contributor guide
Research direction
Start in the Keyboard Manager key-remapping path and reproduce the reported Alt (Left) ↔ Win (Left) configuration on Windows. Trace how the output from one remapping rule is handled when the reverse rule is enabled; done means each physical key independently produces its intended output without recursive remapping, while existing shortcuts such as Alt + Tab remain usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100