Skip to content

New-CommanderHotKey

SYNOPSIS

Creates a new global hot key binding.

SYNTAX

New-CommanderHotKey [[-ModifierKey] <ModifierKeys>] [-Key] <Keys> [-Action] <ScriptBlock> [<CommonParameters>]

DESCRIPTION

Creates a new global hot key binding.

EXAMPLES

EXAMPLE 1

New-CommanderHotKey -Key 'T' -ModifierKey 'Ctrl' -Action { 
    Start-Process notepad
}

Starts notepad when Ctrl+T is pressed.

PARAMETERS

-ModifierKey

One or modifier keys to use for this hot key.

Type: pscommander.ModifierKeys
Parameter Sets: (All)
Aliases:
Accepted values: None, Alt, Ctrl, Shift, Win

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Key

The main key to use for this hot key.

Type: pscommander.Keys
Parameter Sets: (All)
Aliases:
Accepted values: None, LButton, RButton, Cancel, MButton, XButton1, XButton2, Back, Tab, LineFeed, Clear, Enter, Return, ShiftKey, ControlKey, Menu, Pause, CapsLock, Capital, HangulMode, HanguelMode, KanaMode, JunjaMode, FinalMode, KanjiMode, HanjaMode, Escape, IMEConvert, IMENonconvert, IMEAccept, IMEAceept, IMEModeChange, Space, Prior, PageUp, PageDown, Next, End, Home, Left, Up, Right, Down, Select, Print, Execute, Snapshot, PrintScreen, Insert, Delete, Help, D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, LWin, RWin, Apps, Sleep, NumPad0, NumPad1, NumPad2, NumPad3, NumPad4, NumPad5, NumPad6, NumPad7, NumPad8, NumPad9, Multiply, Add, Separator, Subtract, Decimal, Divide, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, NumLock, Scroll, LShiftKey, RShiftKey, LControlKey, RControlKey, LMenu, RMenu, BrowserBack, BrowserForward, BrowserRefresh, BrowserStop, BrowserSearch, BrowserFavorites, BrowserHome, VolumeMute, VolumeDown, VolumeUp, MediaNextTrack, MediaPreviousTrack, MediaStop, MediaPlayPause, LaunchMail, SelectMedia, LaunchApplication1, LaunchApplication2, Oem1, OemSemicolon, Oemplus, Oemcomma, OemMinus, OemPeriod, OemQuestion, Oem2, Oem3, Oemtilde, OemOpenBrackets, Oem4, Oem5, OemPipe, Oem6, OemCloseBrackets, Oem7, OemQuotes, Oem8, OemBackslash, Oem102, ProcessKey, Packet, Attn, Crsel, Exsel, EraseEof, Play, Zoom, NoName, Pa1, OemClear, KeyCode, Shift, Control, Alt, Modifiers

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Action

The action to invoke for this hot key.

Type: System.Management.Automation.ScriptBlock
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Back to top