8 Step macro and profile switching fully working

This commit is contained in:
2026-04-13 22:34:49 +02:00
parent e01666ab59
commit 24fe162833
8 changed files with 185 additions and 58 deletions
+23 -2
View File
@@ -22,13 +22,34 @@ public ushort ResultPeriod { get; } // Periode in ms
| HID Tastatur | `_hidKeyPanel` | Capture-Button + Strg/Shift/Alt/Win-Checkboxen |
| HID Consumer | `_consumerPanel` | Dropdown mit 12 Medien-Aktionen |
| Host Command | `_cmdPanel` | TextBox für numerische Command-ID |
| Makro | `_macroPanel` | 4 Step-Buttons + je Strg/Shift/Alt-Checkboxen |
| Makro | `_macroPanel` | 8 Step-Buttons + je Strg/Shift/Alt-Checkboxen |
| Profil wechseln | `_profilePanel` | Dropdown: "Nächstes Profil (Zyklus)" / "Profil 1" / "Profil 2" / "Profil 3" |
| Keine | — | Alle Panels ausgeblendet |
LED-Panels (`_colorPanel`, `_animPanel`) erscheinen zusätzlich wenn `showColor=true` (nur MX-Buttons, nicht Encoder).
`UpdateLayout()` repositioniert LED-Panels und passt `ClientSize` dynamisch an wenn der Typ gewechselt wird.
## Profil-Panel
```csharp
// Items in _profileCombo:
// Index 0: "Nächstes Profil (Zyklus)" → Data = 0xFFFF
// Index 1: "Profil 1" → Data = 0
// Index 2: "Profil 2" → Data = 1
// Index 3: "Profil 3" → Data = 2
// Initialbelegung:
_profileCombo.SelectedIndex = action.Data == 0xFFFF ? 0 : action.Data + 1;
// In OnOk():
data = _profileCombo.SelectedIndex == 0
? (ushort)0xFFFF
: (ushort)(_profileCombo.SelectedIndex - 1);
```
Im Board wird `0xFFFF` als `(uint8_t)0xFF` gespeichert und in der Firmware als "nächstes Profil" interpretiert.
## Tasten-Capture (HID-Modus)
1. Benutzer klickt "Taste drücken..."
@@ -41,7 +62,7 @@ WinForms behandelt Pfeil- und Enter-Tasten als "Dialog Keys" in `ProcessDialogKe
## Makro-Capture
Jeder der 4 Steps hat einen eigenen Capture-Button. `_captureStep` (03, -1 = inaktiv) zeigt welcher Step gerade aufnimmt. Capture-Logik identisch mit HID-Modus, schreibt in `_stepKeycodes[captureStep]`.
Jeder der 8 Steps hat einen eigenen Capture-Button. `_captureStep` (07, -1 = inaktiv) zeigt welcher Step gerade aufnimmt. Capture-Logik identisch mit HID-Modus, schreibt in `_stepKeycodes[captureStep]`.
## Schlüssellookup (layout-unabhängig)