====== SetHotkeyAction ====== SetHotkeyAction [/V:nnn] [/K:{S|C|A|W}] [params] The command binds an action to a keyboard shortcut in the Total Commander window. **Parameters** |< 100% 15% >| ||Autorun internal command. If not set, then no action will be performed, and the existing action of this combination will be blocked.| ||Command parameters (if applicable). Parameters are passed "as is", calculated parameters are recalculated each time the command is called.| **Switches that define the primary key** This type of switch is required and there can be only one (if more than one is specified, the last one will be applied). |< 100% 15% 10%>| ^Switch^Key^Description^ |/H|A...Z\\ 0...9|Letter and number keys.| |:::|F1...F12|Function keys.| |:::|HOME|Home| |:::|END|End| |:::|PGUP|Page Up| |:::|PGDN|Page Down| |:::|INS|Insert| |:::|DEL|Delete| |:::|LEFT|Left Arrow| |:::|RIGHT|Right Arrow| |:::|UP|Up Arrow| |:::|DOWN|Down Arrow| |:::|ESC|Escape| |:::|BS|Backspace| |:::|ENTER|Enter| |:::|SPACE|Space| |:::|TAB|Tab| |:::|PRINTSCREEN|Print Screen| |:::|SCROLLLOCK|Scroll Lock| |:::|PAUSE|Pause| |:::|CAPSLOCK|Caps Lock| |:::|NUMLOCK|Num Lock| |:::|NUMPAD0...NUMPAD9|Numpad Digits| |:::|NUMPADMULT|%%Numpad "*"%%| |:::|NUMPADADD|%%Numpad "+"%%| |:::|NUMPADSUB|%%Numpad "-"%%| |:::|NUMPADDIV|%%Numpad "/"%%| |:::|NUMPADDOT|%%Numpad "."%%| |/V|nnn|The key is assigned a numeric value according to [[https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes|table]] (in decimal). Remaining keys that do not have their own identifier can be set.| **Switches that specify modifiers** |< 100% 15% >| ^Switch^Modifier^Description^ |/K:|C|The action is performed when Ctrl is pressed.| |:::|S|The action is performed while Shift is pressed.| |:::|A|The action is performed when Alt is pressed.| |:::|W|The action is performed while Win is pressed.| Modifiers Ctrl, Shift, Alt, Win can be used in any combination. You can set the switch multiple times to do this. **Optional switches** |< 100% 15% >| |/R|Allow hotkeys repeat (off by default).| |/W|Allow hotkeys work in Total Commander's child windows (by default only in main window).| **Examples** /K:C /K:S /H:N --> Ctrl+Shift+N /K:W /V:35 --> Win+END **Remarks** The main advantage of this command over the standard functionality of Total Commander hotkeys is that the set shortcuts also work from the command line, and not just in panels. Also, it becomes possible to simply call the menu using [[tweaks_csma_ShowPopupMenu]]. If the called command has a calculated string, then when the command is written, it will be executed every time the command is run. It is impossible to achieve the same result in functional notation directly, but you can use an additional user-defined function as an interlayer, in which the necessary command will be called.