Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
たとえば、フォームで 3 つのキーを押したことを検出したいCtrl+ C+ N...検出する必要がある入力されたフォームは、常に 2 文字で始まりCtrl、次に 2 文字が続きます。
どうすればいいですか?
もっと簡単な方法があります:
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin If (GetKeyState(Ord('Q'))<0) and (GetKeyState(Ord('N'))<0) and (GetKeyState(VK_CONTROL)<0) Then ShowMessage('You did it :)'); End;