 <p>Let me recommend you a different, more efficient way to easily hook your keyboard:</p> <p>First, use DllImport and PINvoke inorder to import GetASyncKeyState:</p> <pre><code>[DllImport("user32.dll")] static extern short GetAsyncKeyState(System.Windows.Forms.Keys vKey); </code></pre> <p>Then, you can just use the above function as you wish, such as:</p> <pre><code>public static bool IsKeyPushedDown(System.Windows.Forms.Keys vKey) { return 0 != (GetAsyncKeyState((int)vKey) &amp; 0x8000); } </code></pre> <p>More info: <a href="http://www.pinvoke.net/default.aspx/user32.getasynckeystate" rel="nofollow">PINvoke</a>, <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293(v=vs.85).aspx" rel="nofollow">MSDN</a>.</p> <p>Best of luck.</p> <p>EDIT: btw, If you want to use a barcode reader, you can also create one of your own, or take a look <a href="https://social.msdn.microsoft.com/forums/vstudio/en-US/e5a17395-ab47-4e8c-ab69-d7cadeed65cb/barcode-reader-integration-with-c" rel="nofollow">here</a> or <a href="http://www.barcodelib.com/csharp/barcode_reader_csharp.html" rel="nofollow">here</a>.</p>