// The GetKeyboardType function retrieves information about the current keyboard. function KeyBoardType: string;
begincase GetKeyboardType(0) of
1: Result := "IBM PC/XT or compatible (83-key) keyboard";
2: Result := "Olivetti "ICO" (102-key) keyboard";
3: Result := "IBM PC/AT (84-key) or similar keyboard";
4: Result := "IBM enhanced or compatible";
5: Result := "Nokia 1050 and similar keyboards";
6: Result := "Nokia 9140 and similar keyboards";
7: Result := "Japanese keyboard"
else
Result := "Unrecognized keyboard type";
end;
end;
function KeyBoardSubype: Integer;
begin
Result := GetKeyboardType(1);
end;
function NumberOfFunctionKeys: string;
begincase GetKeyboardType(3) of
1: Result := "20";
2: Result := "12/18";
3: Result := "10";
4: Result := "12";
5: Result := "10";
6: Result := "24";
7: Result := "Hardware dependent"
else
Result := "N/A";
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
label1.Caption := Format("Keyboard Type: %s", [KeyBoardType]);
Label2.Caption := Format("Keyboard Subtype: %d", [KeyBoardSubype]);
Label3.Caption := Format("Keyboard Subtype: %s", [NumberOfFunctionKeys]);
end;
Если Вас заинтересовала или понравилась информация по разработке на Delph - "Получить информацию об установленной клавиатуре", Вы можете поставить закладку в социальной сети или в своём блоге на данную страницу: Так же Вы можете задать вопрос по работе этого модуля или примера через форму обратной связи, в сообщение обязательно указывайте название или ссылку на статью!