procedure TfmQAB.FormShortCut(var Msg: TWMKey; var Handled: Boolean); begin if (Msg.CharCode = 116) and (HiWord(GetKeyState(VK_CONTROL)) = 1) then begin ...... end end;
【參考連結】
- Catch SHIFT key during menu item selection? – Delphi Tips – CJC Delphi (Cool Delphi Tips)
- GetKeyState:GetKeyState ,This function retrieves the specified virtual key -Encyclopedia Knowledge Chinese Network
- DELPHI OnKeyDown,OnKeyPress,OnKeyUp Difference-CSDN Blog_delphi onkeydown
- delphi key value table – Taiwan tribe
- How to detect ctrl-t keypress in Delphi – Stack Overflow
- Keyboard key code value comparison table