Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 968 Bytes

File metadata and controls

38 lines (32 loc) · 968 Bytes

Home

Current keyboard type

Code:

DECLARE INTEGER GetKeyboardType IN user32 INTEGER nTypeFlag
	
? "Keyboard type:", getTypeName()
? "OEM subtype:", GetKeyboardType(1)
? "Number of function keys:", GetKeyboardType(2)

FUNCTION  getTypeName
	lnType = GetKeyboardType (0)
	DO CASE
	CASE lnType = 1
		RETURN "IBM PC/XT or compatible (83-key) keyboard"
	CASE lnType = 2
		RETURN "Olivetti ICO (102-key) keyboard"
	CASE lnType = 3
		RETURN "IBM PC/AT (84-key) or similar keyboard"
	CASE lnType = 4
		RETURN "IBM enhanced (101- or 102-key) keyboard"
	CASE lnType = 5
		RETURN "Nokia 1050 and similar keyboards"
	CASE lnType = 6
		RETURN "Nokia 9140 and similar keyboards"
	CASE lnType = 7
		RETURN "Japanese keyboard"
	OTHER
		RETURN "Unknown keyboard type: " + LTRIM(STR(lnType))
	ENDCASE  

Listed functions:

GetKeyboardType