diff -urN -X /tmp/dontdiff linux-2.4.20/Documentation/Configure.help /usr/src/linux/Documentation/Configure.help --- linux-2.4.20/Documentation/Configure.help Fri Nov 29 00:53:08 2002 +++ /usr/src/linux/Documentation/Configure.help Thu May 1 02:12:04 2003 @@ -17752,6 +17752,16 @@ ) solves this problem, or you can get the "mconv2" utility from . +Disable trackpad while typing +CONFIG_DISABLE_TRACKPAD_WHILE_TYPING + For people with a notebook that have a build in trackpad. + + It prevents unintended mouse moves and mouse taps while typing on + the notebook keyboard. + + The majority of notebooks on the market have a PS/2 trackpad. + So you will probably say "Y" if you have a notebook with a trackpad. + C&T 82C710 mouse port support (as on TI Travelmate) CONFIG_82C710_MOUSE This is a certain kind of PS/2 mouse used on the TI Travelmate. If diff -urN -X /tmp/dontdiff linux-2.4.20/drivers/char/Config.in /usr/src/linux/drivers/char/Config.in --- linux-2.4.20/drivers/char/Config.in Fri Nov 29 00:53:12 2002 +++ /usr/src/linux/drivers/char/Config.in Thu May 1 02:30:45 2003 @@ -170,6 +170,13 @@ tristate 'Mouse Support (not serial and bus mice)' CONFIG_MOUSE if [ "$CONFIG_MOUSE" != "n" ]; then bool ' PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE + + if [ "$CONFIG_PSMOUSE" = "y" ] + then + bool ' Disable Trackpad while typing on Notebooks' CONFIG_DISABLE_TRACKPAD_WHILE_TYPING + fi + + tristate ' C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE tristate ' PC110 digitizer pad support' CONFIG_PC110_PAD tristate ' MK712 touch screen support' CONFIG_MK712_MOUSE diff -urN -X /tmp/dontdiff linux-2.4.20/drivers/char/pc_keyb.c /usr/src/linux/drivers/char/pc_keyb.c --- linux-2.4.20/drivers/char/pc_keyb.c Fri Nov 29 00:53:12 2002 +++ /usr/src/linux/drivers/char/pc_keyb.c Thu May 1 02:30:45 2003 @@ -13,6 +13,11 @@ * Code fixes to handle mouse ACKs properly. * C. Scott Ananian 1999-01-29. * + * Implemented the "disable trackpad while typing" feature. This prevents + * unintended mouse moves and mouse taps while typing on the keyboard on + * notebooks with a PS/2 trackpad. + * Hans-Georg Thien <1682-600@onlinehome.de> 2003-04-30. + * */ #include @@ -85,6 +90,10 @@ /* * PS/2 Auxiliary Device */ +#ifdef CONFIG_DISABLE_TRACKPAD_WHILE_TYPING +static int disable_trackpad_while_typing=0; +static int trackpad_delay=HZ; /* delay trackpad for 1Sec after a key-event */ +#endif static int __init psaux_init(void); @@ -449,6 +458,10 @@ return; } +#ifdef CONFIG_DISABLE_TRACKPAD_WHILE_TYPING + if(disable_trackpad_while_typing > 0) return; +#endif + prev_code = scancode; add_mouse_randomness(scancode); if (aux_count) { @@ -467,8 +480,42 @@ static unsigned char kbd_exists = 1; +#ifdef CONFIG_DISABLE_TRACKPAD_WHILE_TYPING + +void enable_trackpad(unsigned long ptr) +{ + disable_trackpad_while_typing=0; /* re-enable trackpad */ +} + +#endif + static inline void handle_keyboard_event(unsigned char scancode) { + +#ifdef CONFIG_DISABLE_TRACKPAD_WHILE_TYPING + + /* setup a timer to re-enable the trackpad */ + static struct timer_list enable_trackpad_timer; + static int enable_trackpad_timer_initialized=0; + + disable_trackpad_while_typing=1; /* disable trackpad */ + + if(enable_trackpad_timer_initialized) + { + /* trackpad timer already exists, - just restart it */ + mod_timer(&enable_trackpad_timer, jiffies+trackpad_delay); + } + else + { + /* no trackpad timer yet. Initialize and start it */ + init_timer(&enable_trackpad_timer); + enable_trackpad_timer.expires=jiffies+trackpad_delay; + enable_trackpad_timer.function=enable_trackpad; + add_timer(&enable_trackpad_timer); + enable_trackpad_timer_initialized=1; + } +#endif + #ifdef CONFIG_VT kbd_exists = 1; if (do_acknowledge(scancode))