public static bool IsKeyPressed(Keys k) { int s = GetAsyncKeyState((int) k); s = (s & 0x8000) >> 15; return (s == 1); }