Skip the keyboard hook and use an API like
OPOS or NPOS[
^]
OPOS is really easy to use, probably significantly easier than your current approach.
Or take a look at
Barcode scanning[
^] - look at revision 1 for a more complete version of the code. Allows you to easlily read barcodes from a Symbol barcode scanner connected to the serial port. All you need is to implment a single event handler.
Regards
Espen Harlinn