C# WinAPI - KeyEvent
[DllImport("user32.dll")] public static extern void keybd_event(uint vk, uint scan, uint flags, uint extraInfo); [DllImport("user32.dll")] private static extern uint MapVirtualKey(int wCode, int wMapType); // ex) const byte AltKey = 18; const int KEYUP = 0x0002; int Info=0; keybd_event(AltKey, 0, 0, ref Info); // ALT key 다운 keybd_event(AltKey, 0, KEYUP, ref Info); // ALT key 업 // F4 // keydown 0..