//聲明:
GetKeyboardType(
nTypeFlag: Integer {0:鍵盤類型; 1:鍵盤子類型; 2:功能鍵數量}
): Integer;
//舉例:
procedure TForm1.FormCreate(Sender: TObject);
var
i: Integer;
List: TStringList;
begin
List := TStringList.Create;
List.Add('IBM PC/XT or compatible (83-key) keyboard');
List.Add('Olivetti "ICO" (102-key) keyboard');
List.Add('IBM PC/AT (84-key) or similar keyboard');
List.Add('IBM enhanced (101/102-key) keyboard');
List.Add('Nokia 1050 and similar keyboards');
List.Add('Nokia 9140 and similar keyboards');
List.Add('Japanese keyboard');
i := GetKeyboardType(0);
ShowMessage(List[i-1]); {我這裡返回: IBM enhanced (101/102-key) keyboard}
i := GetKeyboardType(1);
ShowMessage(IntToStr(i)); {這是廠商自定義數據, 這裡返回: 0}
i := GetKeyboardType(2);
ShowMessage(IntToStr(i)); {返回: 12; 就是指 F1..F12}
List.Free;
end;