Test for VK_SHIFT being down as well, then case as appropriate. Of course, you can also split your code into two areas, one in the standard windows handler, and the other in the standard OnKeyDown. The following code may help you out as well:Originally Posted by NecroDOME
[pascal]// IsKeyDown
//
function IsKeyDown(c : Char) : Boolean;
var
vk : Integer;
begin
// '$FF' filters out translators like Shift, Ctrl, Alt
vk:=VkKeyScan(c) and $FF;
if vk<>$FF then
Result:=(GetAsyncKeyState(vk)<0>0);
if Result then vLastWheelDelta:=0;
end;
VK_MOUSEWHEELDOWN : begin
Result:=(vLastWheelDelta<0);
if Result then vLastWheelDelta:=0;
end;
else
Result:=(GetAsyncKeyState(vk)<0);
end;
end;[/pascal]
This is taken from GLScene, but its not dependent upon GLScene.
Bookmarks