On Sun, 1 Sep 2002, Ralf Hildebrandt wrote:

> On my new Satellite Pro 6100 laptop I have a problem with bouncing
> keys (only when using X11, Console or frambuffer are not affected).
> 
> Whenever I use "xkbset bouncekeys 10", I get temporary relief, until I
> switch to the framebuffer console and back. Then the bouncing is back.
> 
> This is with kernel-2.4.19, kernel-2.4.19-ac4 and 2.4.20-pre5 and
> XFree-4.2.0 (the experimental Debian packages by branden). I use "nv"
> as driver.
> 
> Is there any way of disabling this bouncing permanently.

   I've investigated this problem a few months ago.  Basically,
it looks like a kernel bug.  /dev/console is returning duplicate
key releases when you type fast enough.  The text mode console seems
to have a filter that makes things usable, but XFree86, which is
reading the raw data from /dev/console doesn't and is not expecting
the kernel to be passing it junk. 

   I wrote a filter for XFree86 and I'm attaching the diff against
common/xf86Events.c, but it's a kludge.  The problem is really in
the kernel.


                        Mark.


*** xf86Events.c.old    Sun May 19 23:05:02 2002
--- xf86Events.c        Sun May 19 23:06:30 2002
***************
*** 262,267 ****
--- 262,269 ----
   *  ifdefs further (hv).
   */
  
+ static unsigned char _down_state[256];
+ 
  #ifdef __linux__
  extern u_char SpecialServerMap[];
  #endif
***************
*** 935,941 ****
      }
    else 
      {
!       ENQUEUE(&kevent, keycode, (down ? KeyPress : KeyRelease), XE_KEYBOARD);
      }
  }
  #endif /* !__EMX__ */
--- 937,947 ----
      }
    else 
      {
!       if(_down_state[keycode] || down) {
!          ENQUEUE(&kevent, keycode, (down ? KeyPress : KeyRelease), XE_KEYBOARD);
!       } 
! 
!       _down_state[keycode] = down;
      }
  }
  #endif /* !__EMX__ */

Reply via email to