A portable Flutter Windows utility for Keybow 2040 macropad automation.
- No Admin Required: Runs as a standalone portable executable
- System Tray: Minimizes to tray with status indicator
- Global Hotkeys: Listens for hotkeys even when not in focus
- PowerShell Integration: Execute scripts with automatic policy bypass
- Macro Logging: Visual log of triggered macros
lib/
├── main.dart # App entry point, macro registration, UI
└── services/
├── services.dart # Barrel export
├── hotkey_service.dart # Global hotkey registration & management
├── tray_service.dart # System tray & window management
├── powershell_executor.dart # PowerShell script execution helper
└── macro_log_provider.dart # State management for macro log
-
Install dependencies:
flutter pub get
-
Add a tray icon: Place your icon file at
assets/icons/app_icon.ico(Windows) orapp_icon.png(other platforms).You can create a simple .ico file or use a tool like ConvertICO.
-
Run the app:
flutter run -d windows
Open lib/main.dart and find the _registerMacros() function. Add your macros like this:
await hotkeyService.registerMacro(
id: 'my_macro',
name: 'My Macro',
description: 'Does something useful',
hotKey: HotkeyService.createFunctionMacroKey(16), // Ctrl+Alt+Shift+F16
action: () async {
// Your logic here
await PowerShellExecutor.execute('Your-PowerShell-Command');
},
);// Ctrl+Alt+Shift+F1 through F24
HotkeyService.createFunctionMacroKey(15) // F15
// Ctrl+Alt+[key]
HotkeyService.createCtrlAltKey(LogicalKeyboardKey.keyM)
// Custom combination
HotKey(
key: LogicalKeyboardKey.keyK,
modifiers: [HotKeyModifier.control, HotKeyModifier.shift],
)The PowerShellExecutor handles:
-ExecutionPolicy Bypass(no admin needed)-WindowStyle Hidden(no console flash)-NoProfile(faster startup)
// Simple command
final result = await PowerShellExecutor.execute('Get-Date');
print(result.stdout);
// Run a script file
await PowerShellExecutor.executeFile(r'C:\Scripts\myscript.ps1');
// Send keystrokes to active window
await PowerShellExecutor.sendKeys('{F5}');
// Activate a window by process name
await PowerShellExecutor.activateWindow('mstsc'); // Remote Desktopflutter build windows --releaseThe portable executable will be at:
build\windows\x64\runner\Release\keybow.exe
Copy the entire Release folder for distribution.
You need to provide a .ico file for Windows at assets/icons/app_icon.ico.
If you don't have an icon, create a simple placeholder:
- Create any 256x256 PNG
- Convert to ICO using an online converter
MIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source software, freely available for anyone to use, modify, and distribute under the MIT License.