//声明: GetKeyboardType( nTypeFlag: Integer {0:键盘类型; 1:键盘子类型; 2:功能键数量} ): Integer; //举例: procedure TForm1.FormCreate(Sender: TObject); var i: Integer; List: TStringList; begin List := TStringList.Create; List.Add('IBM PC/XT or compatible (83-key) keyboard'); List.Add('Olivetti "ICO" (102-key) keyboard'); List.Add('IBM PC/AT (84-key) or similar keyboard'); List.Add('IBM enhanced (101/102-key) keyboard'); List.Add('Nokia 1050 and similar keyboards'); List.Add('Nokia 9140 and similar keyboards'); List.Add('Japanese keyboard'); i := GetKeyboardType(0); ShowMessage(List[i-1]); {我这里返回: IBM enhanced (101/102-key) keyboard} i := GetKeyboardType(1); ShowMessage(IntToStr(i)); {这是厂商自定义数据, 这里返回: 0} i := GetKeyboardType(2); ShowMessage(IntToStr(i)); {返回: 12; 就是指 F1..F12} List.Free; end;
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步