예제 #1
0
 /// <summary>
 /// Send a Virtual Key to FFXIV
 /// </summary>
 /// <param name="key">Virtual Key to press</param>
 /// <param name="keyup">Should we keypress up (default: true)</param>
 /// <param name="delay">Delay between keydown and keyup (default: 100ms)</param>
 public void SendKeyPress(VKKeys key, bool keyup = true, int delay = 100)
 {
     PostMessage(_ffxivWindow, WM_KEYDOWN, (IntPtr)key, IntPtr.Zero);
     if (keyup)
     {
         Thread.Sleep(delay);
         PostMessage(_ffxivWindow, WM_KEYUP, (IntPtr)key, IntPtr.Zero);
     }
 }
예제 #2
0
 public void ToggleKeyState(VKKeys key, bool keydown = true)
 {
     if (keydown)
     {
         PostMessage(_ffxivWindow, WM_KEYDOWN, (IntPtr)key, IntPtr.Zero);
     }
     else
     {
         PostMessage(_ffxivWindow, WM_KEYUP, (IntPtr)key, IntPtr.Zero);
     }
 }
예제 #3
0
 /// <summary>
 /// Send a Virtual Key to FFXIV
 /// </summary>
 /// <param name="key">Virtual Key to press</param>
 /// <param name="keyup">Should we keypress up (default: true)</param>
 /// <param name="delay">Delay between keydown and keyup (default: 100ms)</param>
 public void SendKeyPress(VKKeys key, bool keyup = true, int delay = 100)
 {
     PostMessage(_ffxivWindow, WM_KEYDOWN, key, 0);
     if (keyup)
         {
             Thread.Sleep(delay);
             PostMessage(_ffxivWindow, WM_KEYUP, key, 0);
         }
 }
예제 #4
0
 //static extern bool PostMessage (HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
 private static extern bool PostMessage(IntPtr hWnd, uint msg, VKKeys wParam, Int32 lParam);
예제 #5
0
 public void ToggleKeyState(VKKeys key, bool keydown = true)
 {
     if (keydown)
         PostMessage (_ffxivWindow, WM_KEYDOWN, (IntPtr)key, IntPtr.Zero);
     else
         PostMessage (_ffxivWindow, WM_KEYUP, (IntPtr)key, IntPtr.Zero);
 }
예제 #6
0
 //static extern bool PostMessage (HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
 private static extern bool PostMessage(IntPtr hWnd, uint msg, VKKeys wParam, Int32 lParam);