 |
|
 |
 |
 |
| ...detect if Alt, Shift, Control are pressed? |
| Author:
Thomas Stutz
|
| [ Print tip
] |
|
|
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;
Rate this tip:
|
 |
 |
 |
|
 |