library altgr98;
{$A+,B-,D+,F-,G+,I-,K+,L+,N-,P+,Q-,R-,S-,T+,V+,W-,X+,Y+}
{$C PRELOAD FIXED PERMANENT}
{$D rechte Win95-Taste wie AltGr, h#s 09/00}
uses WinProcs,WinTypes,Win31;
var
Hook: HHook;
KS: TKeyboardState;
type
LongRec=record
lo,hi: Word;
end;
function KeyboardProc(code: Integer; wParam:Word; lParam:LongInt):
LongInt; export;
var
lPar: LongRec absolute lParam;
begin
if (code>=0) and (wParam=$5C) then begin {rechte Win95-Taste}
GetKeyboardState(KS);
if lPar.hi and $8000 =0 then begin {Drcken}
KS[VK_Control]:=#$80;
KS[VK_Menu]:=#$80;
end else begin {Loslassen}
KS[VK_Control]:=#$00;
KS[VK_Menu]:=#$00;
end;
SetKeyboardState(KS);
KeyboardProc:=1;
end else begin
KeyboardProc:=CallNextHookEx(Hook,code,wParam,lParam);
end;
end;
procedure WEP;
begin
UnhookWindowsHookEx(Hook);
end;
begin
Hook:=SetWindowsHookEx(WH_Keyboard,KeyboardProc,HInstance,0);
end.
Detected encoding: UTF-8 | 0
|