$AKey - Macros

Far Manager

$AKey

The $AKey macro-command inserts the name of the hotkey that was used to call the current macro.
$AKey

Arguments

None.

Remarks

  1. It is impossible to use macro-language elements while recording a macro in a usual way. Macro-language elements can be added to the sequence only by editing the registry manually or by using special applications or FAR plugins.

Example

A macro for switching between screens. 10 similar AltNumber macros should be entered in the Common area:
$If ( Dialog || MainMenu || Menu || UserMenu || Search )
  $AKey
$Else
  %s = AKey ( 1 );
  %c = substr ( %s, len ( %s ) - 1, 1 );
  F12
  $If ( CheckHotkey ( %c ) )
    eval ( %c )
  $Else
    Esc
    $AKey
  $End
$End
See also: