public static bool GetKey(VKeyCode kc) { int i = (int)kc; var ar = Instance._pollValues; if (i >= 0 && i < ar.Length) { return(ar[i]); } return(false); }
public static bool GetKeyDown(VKeyCode kc) { int i = (int)kc; var arPrev = Instance._pollValuesPrev; var ar = Instance._pollValues; if (i >= 0 && i < ar.Length) { return(!arPrev[i] && ar[i]); } return(false); }
public static short GetKeyState(VKeyCode code) { return(GetKeyState((int)code)); }
public static bool IsKeyPressed(VKeyCode code) { return((GetKeyState(code) & 0x80) != 0); }
public static void Event( VKeyCode vk, byte scan, KEYEVENTF flags, UIntPtr extra ) { keybd_event( (byte)vk, scan, (byte)flags, extra ); }
public static bool IsKeyDown(VKeyCode code) { return((GetKeyState(code) & 0x100) != 0); }