Lightweight tray application for remapping HP laptop special function keys (MyHP/HP System Event Utility/HP Programmable Key). Tested on an HP OmniBook, YMMV on other models. This is a vibe coded app, use at your own risk.
This is a Windows tray application that monitors HP WMI events and allows you to configure custom actions when special HP laptop buttons are pressed. The application runs in your user session with a system tray icon.
- ✅ Simple tray application - Runs in your system tray
- ✅ No administrator required - Installs to your user account
- ✅ GUI Configurator - Easy-to-use interface for configuration
- ✅ Multiple action types:
- Launch Application (with parameters)
- Open Website
- Send Keyboard Shortcuts
- ✅ Auto-start - Automatically starts when you log in
- ✅ Lightweight - Minimal resource usage
HP laptops have special function keys (like F11 with custom icons) that trigger WMI events rather than standard keyboard input. These keys are invisible to tools like PowerToys and AutoHotkey.
This lightweight tray application monitors HP's WMI events (hpqBEvnt) and executes configured actions. Configure it easily through the GUI or by right-clicking the tray icon.
- Windows 10/11
- HP laptop with special function keys
- .NET 8.0 Runtime (Download here - most modern Windows systems already have this)
Simple One-Click Installation:
- Download
HPButtonRemap-Installer.exe(~66MB) from the Releases page - Run the installer
- Click "Install"
- Done! The tray icon should appear in your system tray
The installer will:
- Install the application to
%LOCALAPPDATA%\HPButtonRemap\(~3MB) - Add a shortcut to your Startup folder (auto-start on login)
- Add "HP Button Remap Configurator" to your Start Menu
- Start the application immediately
- Right-click the tray icon and select "Open Configurator"
- OR open Start Menu and search for "HP Button Remap Configurator"
- Add/Edit/Delete button actions using the GUI
- Save your configuration
- Right-click tray icon and select "Reload Configuration" to apply changes
Right-click the tray icon for quick access to:
- Open Configuration - Edit config.json directly
- Open Configurator - Launch the GUI configurator
- Reload Configuration - Apply changes after editing
- About - View application info
- Exit - Close the application
- Browse to select any
.exefile - Optionally add command-line arguments
- Example: Launch Chrome with a specific URL
- Enter any website URL
- Opens in your default browser
- Example:
https://www.google.com
- Specify key combinations with
+separator - Supported keys: Ctrl, Shift, Alt, Win, F1-F12, A-Z, 0-9, special keys
- Examples:
Ctrl+Shift+T- Reopen closed tabWin+D- Show desktopCtrl+Alt+Delete- Security screen
Method 1: Via Tray Icon (Easiest)
- Right-click the tray icon
- Select "Uninstall..."
- Confirm the uninstallation
- Your configuration will be backed up to your Desktop
Method 2: Via Installer
- Run
HPButtonRemap-Installer.exe --uninstall - Follow the uninstallation wizard
This will:
- Stop the application
- Remove the Startup shortcut
- Remove the Start Menu shortcut
- Remove the installation directory
- Optionally backup your config file to Desktop
- Check if the application is running in Task Manager
- Look in the hidden icons area of the system tray
- Restart the application from the Start Menu
- Right-click tray icon and select "Reload Configuration"
- Verify Event ID is
29and Event Data is8616in your config - Make sure your action details are correct
- Make sure you have the latest release
- Check that
HPButtonRemapConfig.exeexists in%LOCALAPPDATA%\HPButtonRemap\ - Try editing the config.json file directly instead
If you want to map a different HP special key:
-
Open PowerShell and run:
Register-WmiEvent -Namespace "root\wmi" -Query "SELECT * FROM hpqBEvnt" -SourceIdentifier "HPTest"
-
Press your special key
-
Check the event details:
Get-Event -SourceIdentifier "HPTest" | ForEach-Object { $_.SourceEventArgs.NewEvent | Format-List EventID, EventData }
-
Note the
EventIDandEventDatavalues -
Clean up:
Unregister-Event -SourceIdentifier "HPTest" Remove-Event *
-
Enter these values in the configurator GUI or config.json
- Architecture: Windows Forms tray application
- GUI: WPF Application (.NET 8.0)
- Platform: Windows (x64)
- Distribution: Self-contained single-file executables
- Dependencies:
- System.Management (WMI event monitoring)
- Newtonsoft.Json (JSON configuration)
- Installation Location:
%LOCALAPPDATA%\HPButtonRemap\ - Configuration File:
config.jsonin installation directory
If you want to build from source:
# Clone the repository
git clone https://github.com/Shapes0/myhp-button-remap.git
cd myhp-button-remap
# Build the tray application
cd HPButtonRemap
dotnet publish --configuration Release --runtime win-x64 --self-contained true -p:PublishSingleFile=true
# Build the configurator
cd ../HPButtonRemapConfig
dotnet publish --configuration Release --runtime win-x64 --self-contained true -p:PublishSingleFile=true
# Build the installer (optional - embeds the above two)
cd ../Installer
dotnet publish --configuration Release --runtime win-x64 --self-contained true -p:PublishSingleFile=true
# The installer will be in Installer/bin/Release/net8.0-windows/win-x64/publish/Requirements for building:
- .NET 8.0 SDK
- Windows 10/11
- Visual Studio or VS Code (optional, for IDE support)
Alternative: PowerShell Scripts
For manual installation without the GUI installer:
# Build the components first, then run:
.\Install.ps1The configuration is stored in JSON format:
{
"ShowStartupNotification": true,
"ButtonActions": [
{
"Name": "F11 Key - Launch Notepad",
"EventID": 29,
"EventData": 8616,
"Type": "LaunchApp",
"LaunchPath": "notepad.exe",
"LaunchArguments": ""
}
]
}Settings:
ShowStartupNotification- (true/false) Show balloon notification when tray app starts with action count. Can be disabled in the configurator GUI if you find it annoying.
See CONFIG-EXAMPLES.md for more examples.
- ✅ No Windows Service complexity
- ✅ No Session 0 isolation issues
- ✅ Runs directly in your user session
- ✅ Visible in Task Manager
- ✅ System tray integration
- ✅ GUI configurator
- ✅ No administrator rights needed (after installation)
- ✅ Standard Windows application behavior
- ✅ Auto-starts on login
- ✅ Applications launch in correct session
- ✅ Easy to troubleshoot
Contributions welcome! Please open an issue or PR.
MIT License - See LICENSE file for details