Extending ShortcutKeys

It is quite easy to extend ShortcutKeys to accept different methods of ActionKey presses or signalling. The Serial Port Extension is an example of this.
All the handling is done trough ActionKey.dll. Here is a template library in Delphi. It should be possible in C, too.

library ActionKey;

{$R *.res}

procedure ActionKeyStartListen(ParamV: PChar); stdcall;
begin
  //Initialization.
  //ParamV contains the contents of the Virtual Keycode box
end;

procedure ActionKeyStopListen; stdcall;
begin
  //Finalization.
end;

function ActionKeyIsAKToggle: boolean; stdcall;
begin
  //Return true if the ActionKey just fired a KeyDown event.
  ActionKeyIsAKToggle:=false;
end;

procedure ActionKeySetToggled(State: boolean); stdcall;
begin
  //Signal the user that the ActionKey is toggled.
  //For example, make a terrible noise throught the PC Speaker
end;

function ActionKeyIsCustom: boolean; stdcall;
begin
  //This IS a custom ActionKey library.
  ActionKeyIsCustom:=true;
end;

exports ActionKeyStartListen,ActionKeyStopListen,ActionKeyIsAKToggle,ActionKeySetToggled,ActionKeyIsCustom;

begin
end.