I am trying to write a program to capture and use input from a barcode scanner. The barcode scanner is interpreted as a second keyboard when plugged into a computer (vis USB). I am trying to write a program that will capture all of the input from the barcode scanner (2nd keyboard) but none from the main keyboard. The problem is I don't really know where to start. I am using linux (ubuntu) and I've tried catching the input from /dev/input/by-id/barcode_reader and from /dev/input/input17 but it doesn't seem to work. Can anyone give me some advice on what to read to learn more about this?