📄 unitfrmmain.pas
字号:
unit unitFrmMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Timer1: TTimer;
StatusBar1: TStatusBar;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Timer1Timer(Sender: TObject);
var ks: tkeyboardstate;
begin
getkeyboardstate(ks); //检测键盘函数
if odd(ks[VK_NUMLOCK]) then
statusbar1.panels.items[0].text := 'NUM'
else
statusbar1.panels.items[0].text := '';
if odd(ks[VK_INSERT]) then
statusbar1.panels.items[1].text := 'INSERT'
else
statusbar1.panels.items[1].text := '';
if odd(ks[VK_CAPITAL]) then
statusbar1.panels.items[2].text := 'CAPITAL'
else
statusbar1.panels.items[2].text := '';
if odd(ks[VK_SCROLL]) then
statusbar1.panels.items[3].text := 'SCROLL'
else
statusbar1.panels.items[3].text := '';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -