try this. Hope it helps !
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
Procedure WMHotKey(Var msg: TWMHotkey);
message WM_HOTKEY;
public
{ Public declarations }
end;
var
Form1: TForm1;
handle : HWND;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
//RegisterHotKey(handle,1,mod_control+mod_alt+mod_shift,ord('K'));
RegisterHotKey(handle,1,mod_control,ord('K')); //react on CTRL+K
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
UnRegisterHotKey(handle,1);
end;
procedure TForm1.WMHotKey(Var msg: TWMHotkey);
begin
SetForegroundWindow(Application.Handle);
Showmessage('Hello !');
end;
end.