Z
zed
Hi,
having a card reader attached to the PS/2 keyboard interface, I would
like to filter the keyboard input, so that the input from the card
reader does not reach the GUI controls.
I tried setting KeyPreview=true on the form and catched all input with
the KeyDown event. In order to detect, if the input comes from the
card reader, I need to check a sequence of at least 10 keys. So I
collect the keys in KeyDown and if it's a card reader sequence, I
trigger a special action for it. If it's normal user input, I need to
"forward" the collected key strokes to the form.
The second part is the complicated one. Having a sequence of key
strokes in an array of type System.Windows.Forms.Keys, how do I resend
these to the application? Sendkeys only accepts a string and seems to
not support all values of the System.Windows.Forms.Keys enum.
Is there maybe a way to resend keystrokes using the integer values
captured from the KeyValue member of the KeyEventArgs?
bye,
Marc T.
having a card reader attached to the PS/2 keyboard interface, I would
like to filter the keyboard input, so that the input from the card
reader does not reach the GUI controls.
I tried setting KeyPreview=true on the form and catched all input with
the KeyDown event. In order to detect, if the input comes from the
card reader, I need to check a sequence of at least 10 keys. So I
collect the keys in KeyDown and if it's a card reader sequence, I
trigger a special action for it. If it's normal user input, I need to
"forward" the collected key strokes to the form.
The second part is the complicated one. Having a sequence of key
strokes in an array of type System.Windows.Forms.Keys, how do I resend
these to the application? Sendkeys only accepts a string and seems to
not support all values of the System.Windows.Forms.Keys enum.
Is there maybe a way to resend keystrokes using the integer values
captured from the KeyValue member of the KeyEventArgs?
bye,
Marc T.