GetKeyboardType

Version 3.0

Syntax

int GetKeyboardType(nTypeFlag)

This function retrieves the system-keyboard type.

Parameter Type/Description  
nTypeFlag int Determines whether the function returns a value indicating the type or subtype of the keyboard. It may be one of the following values:  
  Value Meaning
  0 Function returns the keyboard type.
  1 Function returns the keyboard subtype.
  2 Function returns the number of function keys on the keyboard.

Return Value

The return value indicates the type or subtype of the system keyboard or the number of function keys on the keyboard. The subtype is an OEM-dependent value. The type may be one of the following values:

Value Meaning
1 IBMÒ PC/XTÔ, or compatible (83-key) keyboard
2 OlivettiÒ M24 “ICO” (102-key) keyboard
3 IBM ATÒ (84-key) or similar keyboard
4 IBM Enhanced (101- or 102-key) keyboard
5 Nokia 1050 and similar keyboards
6 Nokia 9140 and similar keyboards

The return value is zero if the nTypeFlag parameter is greater than 2 or if the function fails.

Comments

An application can determine the number of function keys on a keyboard from the keyboard type. The following shows the number of function keys for each keyboard type:

Type Number of Function Keys
1 10
2 12 (sometimes 18)
3 10
4 12
5 10
6 24