Parsing the keyboard buffer.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pesobol@gmail.com

    Parsing the keyboard buffer.

    I am using a wedge barcode scanner to enter data in an access
    database, but for certain combinations of characters I want to parse
    the input in code and react accordingly. The keypress event on the
    form only gives me access to the first character in the string, is
    there some way to access the keyboard buffer during the keypress event
    and get the rest of the string? The only way I have found to do this
    is write the data to a field on the form and then parse it in the
    after_update event. Is there another way?

    Thanks in advance.
  • Bruce

    #2
    Re: Parsing the keyboard buffer.

    On Apr 17, 10:35 pm, peso...@gmail.c om wrote:
    I am using a wedge barcode scanner to enter data in an access
    database, but for certain combinations of characters I want to parse
    the input in code and react accordingly. The keypress event on the
    form only gives me access to the first character in the string, is
    there some way to access the keyboard buffer during the keypress event
    and get the rest of the string? The only way I have found to do this
    is write the data to a field on the form and then parse it in the
    after_update event. Is there another way?
    >
    Thanks in advance.
    Have you looked at the keydown (not keypress) and change events? Both
    of these react to individually typed characters. How they would react
    to entry from a barcode scanner, I don't know, but it's worth looking
    into. Are you saying that you want there to be a reaction prior to
    all of the barcode characters from a single barcode being read? If
    not, then you're probably taking the right approach by using the
    afterupdate event to parse the input (or beforeupdate if you need to
    do some kind of validation before accepting the input).

    Bruce

    Comment

    • lyle fairfield

      #3
      Re: Parsing the keyboard buffer.

      pesobol@gmail.c om wrote in news:65af1f53-527d-47ae-ac1c-
      597aadefe16a@d4 5g2000hsc.googl egroups.com:
      I am using a wedge barcode scanner to enter data in an access
      database, but for certain combinations of characters I want to parse
      the input in code and react accordingly. The keypress event on the
      form only gives me access to the first character in the string, is
      there some way to access the keyboard buffer during the keypress event
      and get the rest of the string? The only way I have found to do this
      is write the data to a field on the form and then parse it in the
      after_update event. Is there another way?
      The GetKeyboardStat e API function should captures key presses.

      You can see an example at



      Of course, that would need considerable modification to capture and
      interpret the keypresses that are significant to you.

      Comment

      Working...