7,540
社区成员
发帖
与我相关
我的任务
分享
[DllImport("user32.dll", EntryPoint = "keybd_event", CharSet = CharSet.Auto, ExactSpelling = true)]
public static extern void Keybd_event(byte vk, byte scan, int flags, int extrainfo);
const int KEYEVENTF_EXTENDEDKEY = 0x1;
const int KEYEVENTF_KEYUP = 0x2;
Keybd_event((byte)20, 0x45, KEYEVENTF_EXTENDEDKEY, 0);
Keybd_event((byte)20, 0x45, KEYEVENTF_KEYUP, 0);