-
Detecting Input Source
Hello everyone,
I was wondering if there is a way in code that you can detect where an input
came from, whether keyboard or other COM port? I thank you ahead of time.
Anthony
-
Re: Detecting Input Source
What sort of input?
Both Keyboard and the Com port are monitored by completely different methods.
--
Dean Earley (dean.earley@icode.co.uk)
Assistant Developer
iCode Systems
"Anthony" <anthonycaravia@poorman-douglas.com> wrote in message news:3b44d7ef@news.devx.com...
>
> Hello everyone,
> I was wondering if there is a way in code that you can detect where an input
> came from, whether keyboard or other COM port? I thank you ahead of time.
>
> Anthony
-
Re: Detecting Input Source
Well I'm using a barcode scanner and I want to be able to have my application
know whether an input comes from the scanner or keyboard. I
can't recall at the moment where the Barcode scanner was connected but I
want to say that it shared the mouse connection.
"Dean Earley" <dean.earley@icode.co.uk> wrote:
>What sort of input?
>Both Keyboard and the Com port are monitored by completely different methods.
>
>--
>Dean Earley (dean.earley@icode.co.uk)
>Assistant Developer
>
>iCode Systems
>"Anthony" <anthonycaravia@poorman-douglas.com> wrote in message news:3b44d7ef@news.devx.com...
>>
>> Hello everyone,
>> I was wondering if there is a way in code that you can detect where an
input
>> came from, whether keyboard or other COM port? I thank you ahead of time.
>>
>> Anthony
>
>
-
Re: Detecting Input Source
"Anthony" <anthonycaravia@poorman-douglas.com> wrote:
>
>Well I'm using a barcode scanner and I want to be able to have my application
>know whether an input comes from the scanner or keyboard. I
>can't recall at the moment where the Barcode scanner was connected but I
>want to say that it shared the mouse connection.
>
>"Dean Earley" <dean.earley@icode.co.uk> wrote:
>>What sort of input?
>>Both Keyboard and the Com port are monitored by completely different methods.
>>
>>--
>>Dean Earley (dean.earley@icode.co.uk)
>>Assistant Developer
>>
>>iCode Systems
>>"Anthony" <anthonycaravia@poorman-douglas.com> wrote in message news:3b44d7ef@news.devx.com...
>>>
>>> Hello everyone,
>>> I was wondering if there is a way in code that you can detect where an
>input
>>> came from, whether keyboard or other COM port? I thank you ahead of
time.
>>>
>>> Anthony
>>
>> I think you are going to have to deal with the interrupt used by the device.
I used to own a computerized cash register business and I did alot of work
with citizen and an old keyboard system that ran on rs422 com ports converted
from standard serial ports, I did the programming in Turbo Pascal. scanners
can operate inbetween a keyboard and the cpu and you need to detect the interupt
and the data being sent with it. You can only get interrupt 17 times a second
so you may consider using the timer function and checking the intrreupt status
in 1000/17 times within you function and then doing whatever you need when
the device (scanner) driver determines it was called. VB may have some other
function to do all this in 1 call but i am not knowledgable enuff to know
that. good luck
>
-
Re: Detecting Input Source
If it is sharing a connection with the mouse, I'd say it was serial, and wouldn't affect the keyboard at all. To read it, use a
serial control like MSComm.
If it shared a connection with the keyboard, you would need to configure the scanners to send some characters before and after the
code. This is very device specific, so I suggest either looking in the manual, or looking on the manufactures website.
--
Dean Earley (dean.earley@icode.co.uk)
Assistant Developer
iCode Systems
"Anthony" <anthonycaravia@poorman-douglas.com> wrote in message news:3b4cc91e$1@news.devx.com...
>
> Well I'm using a barcode scanner and I want to be able to have my application
> know whether an input comes from the scanner or keyboard. I
> can't recall at the moment where the Barcode scanner was connected but I
> want to say that it shared the mouse connection.
>
> "Dean Earley" <dean.earley@icode.co.uk> wrote:
> >What sort of input?
> >Both Keyboard and the Com port are monitored by completely different methods.
> >
> >--
> >Dean Earley (dean.earley@icode.co.uk)
> >Assistant Developer
> >
> >iCode Systems
> >"Anthony" <anthonycaravia@poorman-douglas.com> wrote in message news:3b44d7ef@news.devx.com...
> >>
> >> Hello everyone,
> >> I was wondering if there is a way in code that you can detect where an
> input
> >> came from, whether keyboard or other COM port? I thank you ahead of time.
> >>
> >> Anthony
> >
> >
>
-
Re: Detecting Input Source
Thank you all for you response. I will try your suggestions and let you know
what happens.
"Dean Earley" <dean.earley@icode.co.uk> wrote:
>If it is sharing a connection with the mouse, I'd say it was serial, and
wouldn't affect
>the keyboard at all. To read it, use a
>serial control like MSComm.
>
>If it shared a connection with the keyboard, you would need to configure
the scanners
>to send some characters before and after the
>code. This is very device specific, so I suggest either looking in the
manual, or looking
>on the manufactures website.
>
>--
>Dean Earley (dean.earley@icode.co.uk)
>Assistant Developer
>
>iCode Systems
>"Anthony" <anthonycaravia@poorman-douglas.com> wrote in message news:3b4cc91e$1@news.devx.com...
>>
>> Well I'm using a barcode scanner and I want to be able to have my application
>> know whether an input comes from the scanner or keyboard. I
>> can't recall at the moment where the Barcode scanner was connected but
I
>> want to say that it shared the mouse connection.
>>
>> "Dean Earley" <dean.earley@icode.co.uk> wrote:
>> >What sort of input?
>> >Both Keyboard and the Com port are monitored by completely different
methods.
>> >
>> >--
>> >Dean Earley (dean.earley@icode.co.uk)
>> >Assistant Developer
>> >
>> >iCode Systems
>> >"Anthony" <anthonycaravia@poorman-douglas.com> wrote in message news:3b44d7ef@news.devx.com...
>> >>
>> >> Hello everyone,
>> >> I was wondering if there is a way in code that you can detect where
an
>> input
>> >> came from, whether keyboard or other COM port? I thank you ahead of
time.
>> >>
>> >> Anthony
>> >
>> >
>>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks