TAdvSysKeyboardHook - disable key

Hi to all,

using TAdvSysKeyboardHook there's a way to disable all keys except one ? (i.e. #13, only return key enabled).



Like procedure EnableOnly(Key : Char).



Thank's for reply



Regards



Daniele

You could do this from the event OnKeyDown:


procedure TForm4.AdvSysKeyboardHook1KeyDown(Sender: TObject; Key: Word;
  Shift: TShiftState; var Allow: Boolean);
begin
  Allow := Key = MYALLOWEDKEY;
end;

Hi Bruno,

thank's for reply



Daniele