Delphi Tips&Tricks News   Tips   .NET Software   VCL Software   Search   Contacts
Ultimate Pack - special offer!

Ultimate Pack  hot!
Image Editor  new!
Runtime Fusion
Form Designer
Object Inspector
Print Suite Pro
Commented Image
Delphi Toys
WinDowse
Delphi Bonus
TMS Scripter Studio
Form Designer VB
Form Designer .NET

...get more...
for Delphi.NET, C#, VB.NET
for Delphi VCL, BCB 3-6

WinAPI Online
Unix Manual Pages
MegaDetailed.NET
in3steps.com
cdtrrracks.com new!

Blogspot  greatis.blogspot.com

Get info about keyboard - Manipulators - Tips & Tricks - Greatis Delphi Pages

Use GetKeyboardType function. Parameter 0 of this function will allow to get keyboard type and parameter 2 will allow to get number of functional keys of your keyboard.


procedure TForm1.Button1Click(Sender: TObject);
var
  Str: string;
begin
  case GetKeyboardType(0) of
    1: 	Str:='IBM PC/XT or compatible (83-key) keyboard';
    2:	Str:='Olivetti "ICO" (102-key) keyboard';
    3:	Str:='IBM PC/AT (84-key) or similar keyboard';
    4:  Str:='IBM enhanced (101- or 102-key) keyboard';
    5:  Str:='Nokia 1050 and similar keyboards';
    6:  Str:='Nokia 9140 and similar keyboards';
    7:	Str:='Japanese keyboard';
  end;
  Label1.Caption:='Keyboard type is '+Str;

  case GetKeyboardType(2) of
    1,3,5: Str:='10';
    2,4: Str:='12';
    6: Str:='24';
    7: Str:='Hardware dependent and specified by the OEM';
    else Str:='N/A';
  end;
  Label2.Caption:='Number of functional keys is '+Str;
end;
For more
Win32 Programmer's Reference

Download source