vb中用keybd?
经测试成功实现,不过不同键盘不同系统可能有所区别,需要的话可以修改注释的那行keybd_eventasc("["),MapVirtualKey(asc("["),0),0,0不过我的改了不行,变成windows键了,所以看情况吧OptionExplicitPrivateDeclareSubkeybd_eventLib"user32"_(ByValbVkAsByte,ByValScanAsByte,ByValdwFlagsAsLong,ByValdwExtraInfoAsLong)PrivateConstVK_OEM_4AsLong=&HDBPrivateDeclareFunctionMapVirtualKeyLib"user32"_Alias"MapVirtualKeyA"_(ByValwCodeAsLong,_ByValwMapTypeAsLong)_AsLongPrivateSubForm_Load()Timer1.Interval=1000EndSubPrivateSubTimer1_Timer()keybd_eventVK_OEM_4,MapVirtualKey(VK_OEM_4,0),0,0'模拟按下"["键,此处可以改为ascll码EndSub