Initial commit

This commit is contained in:
2014-04-30 16:57:42 -04:00
commit 5c4a1c8b4c
126 changed files with 52769 additions and 0 deletions

18
IO/Keyboard.cs Normal file
View File

@@ -0,0 +1,18 @@
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace Common.IO
{
public static class Keyboard
{
[DllImport("user32.dll")]
private static extern short GetAsyncKeyState(System.Windows.Forms.Keys vKey);
public static bool IsKeyPressed(Keys keys)
{
short state = GetAsyncKeyState(keys);
return ((state & 0x8000) == 0x8000);
}
}
}