-2
procedure TformMain.FormKeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if (Key = VK_ADD) and (Shift = [ssCtrl]) then
  begin
    ShowMessage('Zoom In');
  end;

end;

I am trying to zoom in and out with keyboard (ctrl++ and ctrl+-)

I wrote my code like this: How to detect ctrl-t keypress in Delphi

But it does not work, how can I fix it?

Community
  • 1
  • 1
Dauezevy
  • 1,012
  • 4
  • 22
  • 46

1 Answers1

1

You're not saying exactly how it does not work, but for starters, make sure you have KeyPreview set to true on the form.

If that's not it, please expand your problem description with more detail.