Re: Keyboard filter (to work with a Card Reader)

From: Ray Trent (ratrent_at_nospam.nospam)
Date: 11/16/04


Date: Tue, 16 Nov 2004 14:09:59 -0800

It's not real clear what you are trying to accomplish, but I'll try to
answer your questions:

Maria Penedo wrote:
> - is a driver the best solution for this case?

It really depends on what you're trying to do. If all you want to do is
look at the keyboard data coming in and respond when a particular
sequence arrives (without changing the stream of keys sent to
applications/the OS) then you don't really need a driver. A simple
user-mode keyboard hook would be much easier.

If you need to alter the stream of characters sent to the OS/apps, then
a kbfiltr-like driver is the only way to do that.

> - If yes, how can I create a buffer in the kbfiltr sample to keep reading
> chars when some kind of input is read?

Again, it's not completely clear what you're trying to do. You could
create such a buffer easily enough (trap the callback and don't send
things on unless/until you want to).

However, you have to be very careful about how you do something like
this. You need to make sure the card reader sends some kind of
out-of-band signal (such as invalid scancodes) to trigger your
buffering, because otherwise you're going to find it hard to avoid
interfering with normal use of the keyboard. You can't really refuse to
send a "%" key up to the OS just because it might eventually be followed
by "a670812".

-- 
../ray\..


Relevant Pages

  • Linux problems with USB HID keyboards and patches
    ... Navigator USB connected keyboard. ... page 0x7, usage 0xe5, code 54 ... The mapping of HID keys to event keys and from event keys ...
    (Linux-Kernel)
  • Re: Great SWT Program
    ... issues of environment input options vs. individual application input ... One trivial example would be a 100-key keyboard where ... The number of keys and the force needed are orthogonal, ...
    (comp.lang.java.programmer)
  • Re: F lock key!
    ... > keyboard has power and then pressing the F2 key or if I want ... remapping of the function keys. ... That means to use those applications that use the ... function keys as intended I have to MANUALLY switch the F-Lock key on/off ...
    (microsoft.public.windowsxp.hardware)
  • Re: ot -keyboard woes
    ... This is leaning more towards either water trapped somewhere ... within the KB circuit board that's shorting out these three keys. ... holes punched in it under the keys, the bottom sheet has the other ... before with the keyboard and that approach worked fine then. ...
    (sci.space.history)
  • Re: Startup
    ... > more features" is simply because it mimics the standard computer keyboard... ... > Large Keys alone is not really a favorite of mine since I need to tap on the ... I absolutely cannot concede that gestures contribute to the soft ... Try to tap on A and without lifting the stylus slide it upwards. ...
    (microsoft.public.pocketpc)