[gpm]Synaptic giant patch

Ben Pfaff blp@cs.stanford.edu
19 Aug 2002 21:50:50 -0700


Let me preface this email by apologizing for the long delay in my
response.  I have been busy writing and debugging other software
on other computers, and my new T30 has not received much use or
much thought.

Peter Berg Larsen <pebl@math.ku.dk> writes:

> On 15 Aug 2002, Ben Pfaff wrote:
> 
> > > > Well, before adding the tab patch and turning on
> > > > stick_pressure_enabled, it did nothing at all, not the touchpad
> > > > itself or its buttons.  Now the touchpad works fine, I can even
> > > > double-tap-and-drag, but the touchpad buttons still don't do
> > > > anything.
> 
> Does toggeling stick_pressure_enabled really alters the behaviour?

I think it was more the tab patch than stick_pressure_enabled,
actually.  Let's see here, I'll try it...  No,
stick_pressure_enabled seems to have no effect.

> >    	tmp_buttons |= ((data[1] & 0x02) ? GPM_B_RIGHT  : 0);
> > -	tp_process_repeating_actions(state,tmp_buttons,last_stick_buttons,
> > -				     &last_stick_button_actions[0],stick_actions);
> > +	state->buttons |= tmp_buttons;
> > +	/*tp_process_repeating_actions(state,tmp_buttons,last_stick_buttons,
> > +				     &last_stick_button_actions[0],stick_actions);*/
> >        } 
> 
> This patch has the disadvantage that it does not allow for userdefined
> behaviour. Of cause it has the small advantage that it works :)
> 
> Could you try the attached patch and send me the "stick buttons: " output?

Of course.  Here is the summary, showing just those lines (I
inserted blank lines for clarity).  I pushed and released the
left button, then the middle button, then the right button; then
I pushed and held the left button while I pushed and released the
middle button; then I pushed and held the right button while I
pushed and released the left button:

*** debug [synaptics.c(1418)]: Stick buttons: 4 4 0    FFFFFFFF FFFFFFFF 4
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 4    FFFFFFFF FFFFFFFF FFFFFFFF

*** debug [synaptics.c(1418)]: Stick buttons: 2 2 0    FFFFFFFF 2 FFFFFFFF
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 2    FFFFFFFF FFFFFFFF FFFFFFFF

*** debug [synaptics.c(1418)]: Stick buttons: 1 1 0    1 FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 1    FFFFFFFF FFFFFFFF FFFFFFFF

*** debug [synaptics.c(1418)]: Stick buttons: 4 4 0    FFFFFFFF FFFFFFFF 4
*** debug [synaptics.c(1418)]: Stick buttons: 6 6 4    FFFFFFFF 2 4
*** debug [synaptics.c(1418)]: Stick buttons: 4 4 6    FFFFFFFF FFFFFFFF 4
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 4    FFFFFFFF FFFFFFFF FFFFFFFF

*** debug [synaptics.c(1418)]: Stick buttons: 1 1 0    1 FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1418)]: Stick buttons: 5 5 1    1 FFFFFFFF 4
*** debug [synaptics.c(1418)]: Stick buttons: 1 1 5    1 FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 1    FFFFFFFF FFFFFFFF FFFFFFFF

Here is the full log, omitting what is printed at initialization:

*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 09 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 4 4 0    FFFFFFFF FFFFFFFF 4
*** debug [synaptics.c(1428)]: StickData? 84 09 00 c4 00 00 :dx:0 dy:0 b:4
*** debug [gpm.c(887)]: Screen size: 175 - 65
*** debug [gpm.c(904)]: x 10, y 16
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=4 vc=2 cl=0
*** debug [gpm.c(210)]: ctl 16, mode 0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: --l--     0x0      0  0 0  l-b-  --      0  0 4           0        0  
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=4 vc=2 cl=0
*** debug [gpm.c(210)]: ctl 0, mode 0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 08 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 4    FFFFFFFF FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1428)]: StickData? 84 08 00 c4 00 00 :dx:0 dy:0 b:0
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=4 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: -----     0x0      0  0 0  l-b-  --      0  0 0           0        0  




*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 0c 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 2 2 0    FFFFFFFF 2 FFFFFFFF
*** debug [synaptics.c(1428)]: StickData? 84 0c 00 c4 00 00 :dx:0 dy:0 b:2
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=2 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: ---m-     0x0      0  0 0  l-b-  --      0  0 2           0        0  
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=2 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 08 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 2    FFFFFFFF FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1428)]: StickData? 84 08 00 c4 00 00 :dx:0 dy:0 b:0
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=2 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: -----     0x0      0  0 0  l-b-  --      0  0 0           0        0  
 


*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 0a 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 1 1 0    1 FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1428)]: StickData? 84 0a 00 c4 00 00 :dx:0 dy:0 b:1
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=1 vc=2 cl=0
*** debug [gpm.c(210)]: ctl 16, mode 0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: ----r     0x0      0  0 0  l-b-  --      0  0 1           0        0  
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=1 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 08 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 1    FFFFFFFF FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1428)]: StickData? 84 08 00 c4 00 00 :dx:0 dy:0 b:0
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=1 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: -----     0x0      0  0 0  l-b-  --      0  0 0           0        0  




*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 09 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 4 4 0    FFFFFFFF FFFFFFFF 4
*** debug [synaptics.c(1428)]: StickData? 84 09 00 c4 00 00 :dx:0 dy:0 b:4
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=4 vc=2 cl=0
*** debug [gpm.c(210)]: ctl 16, mode 0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data a4 ea 04 (c0)
*** debug [synaptics.c(901)]: Synps2: --l--  2656x3787   4 10 0  ----  --      0  0 4           0        0  
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=4 vc=2 cl=0
*** debug [gpm.c(210)]: ctl 0, mode 0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 0d 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 6 6 4    FFFFFFFF 2 4
*** debug [synaptics.c(1428)]: StickData? 84 0d 00 c4 00 00 :dx:0 dy:0 b:6
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=6 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: --lm-     0x0      0  0 0  l-b-  --      0  0 6           0        0  
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 09 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 4 4 6    FFFFFFFF FFFFFFFF 4
*** debug [synaptics.c(1428)]: StickData? 84 09 00 c4 00 00 :dx:0 dy:0 b:4
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=2 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: --l--     0x0      0  0 0  l-b-  --      0  0 4           0        0  
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 08 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 4    FFFFFFFF FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1428)]: StickData? 84 08 00 c4 00 00 :dx:0 dy:0 b:0
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=4 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: -----     0x0      0  0 0  l-b-  --      0  0 0           0        0  
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=0 vc=2 cl=0
*** debug [gpm.c(210)]: ctl 0, mode 3




*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 0a 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 1 1 0    1 FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1428)]: StickData? 84 0a 00 c4 00 00 :dx:0 dy:0 b:1
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=1 vc=2 cl=0
*** debug [gpm.c(210)]: ctl 16, mode 0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 90 f3 06 (d0)
*** debug [synaptics.c(901)]: Synps2: ----r  5012x3971   6  4 0  ----  --      0  0 1           0        0  
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=1 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 0b 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 5 5 1    1 FFFFFFFF 4
*** debug [synaptics.c(1428)]: StickData? 84 0b 00 c4 00 00 :dx:0 dy:0 b:5
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=5 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: --l-r     0x0      0  0 0  l-b-  --      0  0 5           0        0  
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 0a 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 1 1 5    1 FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1428)]: StickData? 84 0a 00 c4 00 00 :dx:0 dy:0 b:1
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=4 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: ----r     0x0      0  0 0  l-b-  --      0  0 1           0        0  
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=1 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 84 08 00 (c4)
*** debug [synaptics.c(1418)]: Stick buttons: 0 0 1    FFFFFFFF FFFFFFFF FFFFFFFF
*** debug [synaptics.c(1428)]: StickData? 84 08 00 c4 00 00 :dx:0 dy:0 b:0
*** debug [gpm.c(619)]: M:   0   0 ( 87  32) - butt=1 vc=2 cl=0
*** debug [gpm.c(1043)]: selected 1 times
*** debug [gpm.c(386)]: Data 80 00 00 (c0)
*** debug [synaptics.c(901)]: Synps2: -----     0x0      0  0 0  l-b-  --      0  0 0           0        0  

-- 
"Unix... is not so much a product
 as it is a painstakingly compiled oral history
 of the hacker subculture."
--Neal Stephenson