📄 u8_3_2.cpp
字号:
//----------------- u8_3_2 ----------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "u8_3_2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
Tf8_3_2 *f8_3_2;
//---------------------------------------------------------------------------
__fastcall Tf8_3_2::Tf8_3_2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall Tf8_3_2::edtInputKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
edtInput->Text="";
lblCtrl->Caption="";
lblAlt->Caption="";
lblShift->Caption="";
if (Shift.Contains(ssAlt))
lblAlt->Caption="Alt 龄";
if(Shift.Contains(ssShift))
lblShift->Caption="Shift 龄";
if(Shift.Contains(ssCtrl))
lblCtrl->Caption="Ctrl 龄";
lblChar->Caption=Char(Key);
lblAsc->Caption=IntToStr(Key);
}
//---------------------------------------------------------------------------
void __fastcall Tf8_3_2::edtInputKeyPress(TObject *Sender, char &Key)
{
lblChar->Caption=Key;
if (Key==13)
lblChar->Caption="Enter" ;
if (Key==27)
lblChar->Caption="ESC" ;
if (Key==20)
lblChar->Caption="Space" ;
lblChar->Caption=Char(Key);
lblAsc->Caption=IntToStr(Key);
}
//---------------------------------------------------------------------------
void __fastcall Tf8_3_2::btnEndClick(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -