Allow configuration of XBE-24 keyboard layout
Test / Run tests (push) Successful in 37s

This commit is contained in:
2026-10-14 16:38:23 +02:00
parent 4b9bcc6ad3
commit c005378368
7 changed files with 263 additions and 110 deletions
+15
View File
@@ -0,0 +1,15 @@
using System.Windows.Media;
namespace PamhagenSysCtrl.Helpers {
public static class Extensions {
public static void SetBacklight(this Xbe24Keyboard k, PamhagenPlant.ShortcutKey key, Color color, bool flashing = false) {
if (App.Config.MapKey(key) is int n)
k.SetBacklight(n, color, flashing);
}
public static bool IsKeyPressed(this Xbe24Keyboard k, PamhagenPlant.ShortcutKey key) {
return App.Config.MapKey(key) is int n && k.IsKeyPressed(n);
}
}
}