...herausfinden, ob die Alt/Shift/Control Taste gedrückt wird?
Autor: Thomas Stutz
function CtrlDown: Boolean;
var
State: TKeyboardState;
begin
GetKeyboardState(State);
Result := ((State[VK_CONTROL] and 128) <> 0);
end;
function ShiftDown: Boolean;
var
State: TKeyboardState;
begin
GetKeyboardState(State);
Result := ((State[VK_SHIFT] and 128) <> 0);
end;
function AltDown: Boolean;
var
State: TKeyboardState;
begin
GetKeyboardState(State);
Result := ((State[VK_MENU] and 128) <> 0);
end;
printed from
www.swissdelphicenter.ch
developers knowledge base