'
' GetKeyboard
'
' Author: Joe Strazzere
'
dim a as unsigned
a = External("user32","GetKeyboardType",0)
Select Case a
case 1
msgbox("PC/XT or compatible 83-key keyboard",,"GetKeyboard")
case 2
msgbox("Olivetti 102-key keyboard",,"GetKeyboard")
case 3
msgbox("AT or compatible 84-key keyboard",,"GetKeyboard")
case 4
msgbox("Enhanced 101- or 102-key keyboard",,"GetKeyboard")
case 5
msgbox("PC/XT or compatible 83-key keyboard",,"GetKeyboard")
case 6
msgbox("Nokia 1050 or similar keyboard",,"GetKeyboard")
case 7
msgbox("Other Japanese keyboard",,"GetKeyboard")
case else
msgbox("I just don't know! "+Str$(a),,"GetKeyboard")
endselect
a = External("user32","GetKeyboardType",1)
msgbox("Keyboard subtype is "+Str$(a),0,"GetKeyboard")
a = External("user32","GetKeyboardType",2)
msgbox("Keyboard has "+Str$(a)+" function keys",0,"GetKeyboard")