Инструменты пользователя

Инструменты сайта


en:autorun:documentation:tweaks_sethotkeyaction

SetHotkeyAction

SetHotkeyAction </H:key> [/V:nnn] [/K:{S|C|A|W}] <cmd> [params]

The command binds an action to a keyboard shortcut in the Total Commander window.

Parameters

<cmd>Autorun internal command. If not set, then no action will be performed, and the existing action of this combination will be blocked.
<params>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).

SwitchKeyDescription
/HA…Z
0…9
Letter and number keys.
F1…F12Function keys.
HOMEHome
ENDEnd
PGUPPage Up
PGDNPage Down
INSInsert
DELDelete
LEFTLeft Arrow
RIGHTRight Arrow
UPUp Arrow
DOWNDown Arrow
ESCEscape
BSBackspace
ENTEREnter
SPACESpace
TABTab
PRINTSCREENPrint Screen
SCROLLLOCKScroll Lock
PAUSEPause
CAPSLOCKCaps Lock
NUMLOCKNum Lock
NUMPAD0…NUMPAD9Numpad Digits
NUMPADMULTNumpad "*"
NUMPADADDNumpad "+"
NUMPADSUBNumpad "-"
NUMPADDIVNumpad "/"
NUMPADDOTNumpad "."
/VnnnThe key is assigned a numeric value according to table (in decimal). Remaining keys that do not have their own identifier can be set.

Switches that specify modifiers

SwitchModifierDescription
/K:CThe action is performed when Ctrl is pressed.
SThe action is performed while Shift is pressed.
AThe action is performed when Alt is pressed.
WThe 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

/RAllow hotkeys repeat (off by default).
/WAllow 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 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.

en/autorun/documentation/tweaks_sethotkeyaction.txt · Последнее изменение: 2024/02/13 20:54 — loopback

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki