Click here to Skip to main content
15,886,864 members

distinguish bewteen keyboard keydown and barcode keydown

Yasser El Shazly asked:

Open original thread
hi guys ,
i develop a Point of Sale application and i have to use barcode , i searched a lot about using barcode in WPF application and i found that barcode act like keyboard so when i scan a barcode a keydown Event is fired (as a key of keyboard is press) the problem that can not distinguish between keyboard press or barcode press i want to get just the code pressed by barcode and ignore the keyboard press
i found many articles talking about that talking about (Raw input Api) and others says may i deal with time consumed to scan the Code (barcode is faster than the keyboard )i cant treat with (Raw input API) can not understand it , and also the second solution is not acceptable for me (i think it is not logic to make all my operations depend up on the time ) , i found this article talking about the problem
http://nicholas.piasecki.name/blog/2009/02/distinguishing-barcode-scanners-from-the-keyboard-in-winforms/[^]

but did not solve my problem , so any one can put me on the right way
thanks in advanced
Tags: C# (C# 4.0), Visual Studio (Visual Studio 2010), WPF

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900