Global Hotkeys
Global hotkeys for invoking PowerShell with keystrokes.
Defining a Hotkey
Set-Hotkey -Action { Start-Process Notepad } -ModifierKeys Ctrl -Key BPassing Variables
$Process = "Notepad"
Set-Hotkey -Action { Start-Process $args[2] } -ArgumentList $Process -ModifierKeys Ctrl -Key BAccessing Foreground Window and Process Information
Set-Hotkey -Action { Write-Host $args[0] } -ModifierKeys Ctrl -Key BRetrieving Hotkeys
Removing Hotkeys
Last updated