Hola,
Algo así podría hacerse, más o menos, tratándose de Delphi:
Código Delphi
[-]
unit UfrmPrincipal;
interface
uses
Forms, Windows, Messages, Dialogs;
type
TfrmPrincipal = class(TForm)
procedure FormCreate(Sender: TObject);
private
procedure AppMessage(var Msg: tagMSG; var Handled: Boolean);
end;
var
frmPrincipal: TfrmPrincipal;
implementation
{$R *.dfm}
procedure TfrmPrincipal.AppMessage(var Msg: tagMSG; var Handled: Boolean);
begin
if (Msg.message = WM_HOTKEY) then
begin
if (LOWORD(Msg.lParam) = MOD_CONTROL)
and (HIWORD(Msg.lParam) = Ord('O')) then
ShowMessage('Pulsaste las teclas "CTRL + O"');
end;
end;
procedure TfrmPrincipal.FormCreate(Sender: TObject);
begin
Application.OnMessage := AppMessage;
end;
initialization
RegisterHotKey(Application.Handle, GlobalAddAtom('MiHotKey'), MOD_CONTROL, Ord('O'));
finalization
UnregisterHotKey(Application.Handle, GlobalAddAtom('MiHotKey'));
end.