Detecting Input Source


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Detecting Input Source

  1. #1
    Anthony Guest

    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

  2. #2
    Dean Earley Guest

    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




  3. #3
    Anthony Guest

    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

    >
    >



  4. #4
    Russell Guest

    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
    >



  5. #5
    Dean Earley Guest

    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

    > >
    > >

    >




  6. #6
    Anthony Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center