anchor.diff:        ((Win32MajorVersion >= 6) and (Win32MinorVersion >= 0)));
   end;
   
  +function WinkeystateToShiftstate(keystate: cardinal): TShiftState;
  +begin
  + result:= [];
  +  if GetKeyState(vk_menu) < 0 then begin
  +    Include(result, ssAlt);
  +  end;
  +  if GetKeyState(vk_shift) < 0 then begin
  +    Include(result, ssShift);
  +  end;
  +  if GetKeyState(vk_control) < 0 then begin
  +    Include(result, ssCtrl);
  +  end;
  +end;
  +
   function fpgWindowProc(hwnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
   var
     w: TfpgWindowImpl;
  
positive.code:   case uMsg of
      WM_CHAR,
      WM_KEYUP,
      WM_KEYDOWN:
          begin
            {$IFDEF DEBUG} write(w.ClassName + ': '); {$ENDIF}
            {$IFDEF DEBUG} writeln('wm_char, wm_keyup, wm_keydown'); {$ENDIF}
  
negative.code:           if kwg <> nil then
              w := kwg;
  
            msgp.keyboard.shiftstate := WinkeystateToShiftstate(lparam);
  //          msgp.keyboard.shiftstate := GetKeyboardShiftState;
            msgp.keyboard.keycode := VirtKeyToKeycode(wParam);
  
            if (uMsg = WM_KEYDOWN) or (uMsg = WM_SYSKEYDOWN) then
            begin
              fpgSendMessage(nil, w, FPGM_KEYPRESS, msgp);
  
  