Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-03-2009, 04:05 AM   #1
LQ Newbie
Registered: Oct 2009
Posts: 9

Rep: Reputation: 0
log scanned barcodes (posing as keystrokes) using python and

I have a barcode scanner that, like most, injects the scanned string and a lf as text from a keyboard. Rather than scan data into an application, I'd like to simply log the time of the scan and barcode data scanned to a file.

I'm so new to this I feel like an idiot but assume I can loop and and use to distinguish between the "real" keyboard and the scanner (scanner is on /dev/input/event7). My question is how to detect the scan, write the characters to a file and, if possible, stop the barcode "keystrokes" from getting to X.

So far:

PHP Code:
import evdev
'/dev/input/event7'  # get the correct one from HAL or so
scanner_device evdev.Device(scanner_location)

In my ignorance, I do not know what to test in the loop and what do next ... please help


barcode, evdev

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me log keystrokes on my USB keyboard? Arancaytar Linux - Software 1 03-04-2009 05:11 PM
Using escape codes to print barcodes c2tidis Linux - Software 0 09-29-2005 12:44 PM
Posing a new security measure..... zhizaki Slackware 4 09-29-2005 12:13 AM
120GB HDD posing as 2.5GB Azriphale Linux - Hardware 1 09-04-2003 10:09 AM
barcodes/fonts vressue Linux - General 1 01-27-2003 07:23 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration