Relative packet format 
In the default Relative mode, each motion packet consists of three bytes. The first byte encodes various status bits, and the other two bytes encode the amount of motion in X and Y that has occurred since the previous packet. 
	//
    // Relative packet format:
    //
    //      7  6  5  4  3  2  1  0
    //     -----------------------
    // [0] YO XO YS XS  1  M  R  L  (Y/X overflow, Y/X sign, buttons)
    // [1] X7 X6 X5 X4 X3 X3 X1 X0  (X delta)
    // [2] Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0  (Y delta)
    //

Y ovfl: 
1 = Y delta value exceeds the range –256...255, 0 = no overflow. When this bit is set, the reported Y delta will be either –256 or +255. 
X ovfl: 
Y sign: 
1 = X delta value exceeds the range –256...255, 0 = no overflow. When this bit is set, the reported X delta will be either –256 or +255. 
X sign: 
1 = Y delta value is negative, 0 = Y delta is zero or positive. 1 = X delta value is negative, 0 = X delta is zero or positive. 
Middle: 
1 = Middle button is currently pressed, 0 = released.
 Right: 
1 = Right button is currently pressed, 0 = released. 
Left: 
1 = Left button is currently pressed (or gesture in progress), 0 = released. 
This is the amount of motion ∆X that has occurred in the X (horizontal) direction since the last motion data report. This byte and the “X sign” bit 

Absolute packet format 
When Absolute mode is enabled, each motion report consists of six bytes. These bytes encode the absolute X, Y location of the finger on the sensor surface, as well as the Z (pressure) value and various other measurements and status bits. 
Synaptics TouchPads support two different Absolute packet formats, depending on the setting of the Wmode bit of the TouchPad mode byte. 

    //
    // The Absolute X/Y/Z/W packet format when Wmode = 1 (Supported by ApplePS2SSmartTouchPad driver)
    //
    //      7  6  5  4  3  2  1  0
    //    -----------------------
    // [0]  1  0 W3 W2  0 W1  R  L  (W bits 3..2, W bit 1, R/L buttons)
    // [1] YB YA Y9 Y8 XB XA X9 X8  (Y bits 11..8, X bits 11..8)
    // [2] Z7 Z6 Z5 Z4 Z3 Z2 Z1 Z0  (Z-pressure, bits 7..0)
    // [3]  1  1 YC XC  0 W0 RD LD  (Y bit 12, X bit 12, W bit 0, RD/LD)
    // [4] X7 X6 X5 X4 X3 X2 X1 X0  (X bits 7..0)
    // [5] Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0  (Y bits 7..0)
    
In this packet, the four-bit W value replaces the Finger and Reserved bits and both Gesture bits. All other bits of the packet remain the same regardless of the Wmode setting. Section 3.2.6 describes the various purposes and interpretations of the W value. 
On typical TouchPads, the L/U bit is identical to the Left button bit, and the R/D bit is identical to the Right bit. On MultiSwitch pads with the capFourButtons capability bit set (see section 4.6 for information on this bit) and Wmode enabled, the L/U and R/D bits also report the states of the Up and Down buttons, respectively. The L/U bit reports the logical XOR of the Left and Up button states. Viewed another way, L/U is the same as the Left bit, unless the Up button is pressed, in which case L/U is the complement of the Left bit. The R/D bit similarly reports the XOR of the Right and Down buttons. This encoding ensures that the packet will be backward compatible (and robust against meddling by “too-smart” keyboard controllers) whenever the Up and Down buttons are not pressed. 
    //
    // This is the format of the 6-byte encapsulation packet.
    // Encapsulation packets are used for PS2 pass through mode, which
    // allows another PS2 device to be connected as a slave to the
    // touchpad.  The touchpad acts as a host for the second evice
    // and forwards packets with a special value for w (w=3)
    // So when w=3 (W3=0,W2=0,W1=1,W0=1), this is what the packets
    // look like.
    //
    // The Absolute X/Y/Z packet format when Wmode = 0
    //
    //      7  6  5  4  3  2  1  0
    //    -----------------------
    // [0]  1  0  0  0  0  1  R  L  (R/L are for touchpad)
    // [1] YO XO YS XS  1  M  R  L  (packet byte 0, Y/X overflow, Y/X sign, buttons)
    // [2]  0  0 B5 B4 Z3 Z2 Z1 Z0  (packet byte 3, B4,B5 buttons, Z=wheel)
    // [3]  1  1  x  x  0  1  R  L  (x=reserved, R/L are for touchpad)
    // [4] X7 X6 X5 X4 X3 X3 X1 X0  (packet byte 1, X delta)
    // [5] Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0  (packet byte 2, Y delta)
    
Note that the Gesture, Left, and Right bits appear twice in the Absolute packet. These bits are guaranteed to be identical in bytes 1 and 4 for a given packet. This and other aspects of the packet design allow low- level host software to interpret an Absolute packet as a sequence of two mouse-compatible three-byte packets. As high-level host software receives these three-byte half-packets, it can examine the upper two bits of the first byte to determine how to combine consecutive half-packets into full six-byte packets. 

Absolute mode Z values 
The Z value reports a measure of the amount of finger contact, which is affected by the contact pressure and by the angle at which the finger is held. The following table illustrates some typical Z values. 
26 Copyright © 2001—2011 Synaptics Incorporated. All Rights Reserved. 
Synaptics PS/2 TouchPad Interfacing Guide 
PN: 511-000275-01 Rev. B 
V alue 	Interpretation 	
Z=0 	No finger contact 	
Z = 10 	Finger hovering near the sensor surface 	
Z = 30 	Very light finger contact 	
Z = 80 	Normal finger contact 	
Z >110 	Very heavy finger contact 	
Z = 255 	Maximum reportable Z 	
The measurement of Z is approximate; actual reported Z values will vary from one TouchPad to another and from one user to another. In fact, because capacitance is influenced by environmental effects such as the moisture of the skin, Z measurements may even vary from day to day for the same TouchPad and user. The measurement of Z also varies depending on the interpolation method used by the TouchPad. 
Absolute mode W values 
Synaptics TouchPads support an optional value in the Absolute packet called W. The W value is reported only when the host enables a special W mode. The W value supplies extra information about the character of the contact with the sensor. The host can use W to distinguish among normal fingers, accidental palm contact, and multiple fingers. 
The following table shows the W values defined for Synaptics TouchPads: 
V alue 	Capability bit set (bit = 1) 	Interpretation 	
W=0 	capMultiFinger 	Two fingers on the pad 	
W=1 	capMultiFinger 	Three or more fingers on the pad 	
W=2 	capEWmode 	Extended W mode 	
W=3 	capPassThru 	Pass-Through encapsulation packet (see section 5.1) 	
W = 4–15 	capPalmDetect 	Finger width; 15 is the maximum reportable width 	

If the capPalmDetect capability bit is set, then W values from 4 to 15 indicate that the TouchPad has sensed a single finger of a particular width. The host can watch for especially wide “fingers” as evidence that the TouchPad was activated by an accidental brush of the hand or palm rather than deliberate finger contact. If capPalmDetect is clear, the W value is reported as 4, regardless of actual finger width. 
Note: The finger width measurement is very approximate. Actual widths will vary from one TouchPad to another and from one user to another. 
Absolute X and Y coordinates 
The X and Y values report the finger’s absolute location on the TouchPad surface at any given time. When Z is zero, X and Y cannot be calculated and so are reported as 0. When Z > 0, X and Y are calculated and scaled to lie in the ranges 

Read Capabilities. 
Beginning with firmware version 7.5, this query has been redefined. See query $00 to obtain the firmware version information. 
For firmware version 7.5 and above, the first and third bytes hold the extended capability bits. The second byte is the model sub-number. 
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 
Byte 1 
Byte 2 
Byte 3 
cap- Extended 	¬ ¬ ¬ ¬ ¬
nExtendedQueries 
¬ ¬ ¬ ¬ 			¬ ¬
Reserved 
¬ 	¬
cap- Middle- Button 
¬ 	¬ ¬ ¬
Reserved 
¬ ¬ ¬ 		
¬ ¬ ¬
Model sub-number 								
capPass Through 
¬ 	capLow Power 
¬ ¬ 	capMultiFinger Report 	¬
capSleep 	¬
capFour Buttons 	capBallistics 	¬
capMulti Finger 	¬ ¬
capPalm Detect 	

For firmware versions prior to 7.5, the first and third bytes hold the extended capability bits. The second byte is the constant $47. 
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 
Byte 1 
Byte 2 
Byte 3 
cap- Extended 	¬ ¬ ¬ ¬ ¬
nExtendedQueries 
¬ ¬ ¬ ¬ 			¬ ¬
Reserved 
¬ ¬ 	¬ ¬
cap- Middle- Button 
¬ 	¬ ¬ ¬ ¬
Reserved 
¬ ¬ ¬ 		
¬ ¬ ¬
01000111 								
capPass Through 	capLow Power 	capMultiFinger Report 	¬
capSleep 
¬ ¬ 	¬
capFour Buttons 
¬ 	capBallistics 	¬ ¬
capMulti- Finger 
¬ ¬ 	¬
capPalm Detect 
¬ 	

Synaptics TouchPads support an extended capability query which reports to the host the presence or absence of various advanced features. 
capExtended (bit 23) This bit is set if the extended capability bits are supported. The host can examine this bit to see whether the other 15 extended capability bits are present and meaningful. The capExtended bit also signifies that the TouchPad supports W mode. 
nExtendedQueries[2..0] (bits 22..20) These bits represent the number of extended queries the TouchPad supports. Taken together they form a 3-bit number which encodes the number of extended query pages that the TouchPad can report. If nExtendedQueries is 1 or greater, then the maximum meaningful query is $08 plus nExtendedQueries. 
Note: capFourButtons and capMiddleButton / nExtendedButtons are mutually exclusive. If a TouchPad reports capFourButtons set then capMiddleButton will be clear and nExtendedButtons will be zero. If capMiddleButton is set and/or nExtendedButtons is non-zero, then the multi-button option is set. 
capMiddleButton (bit 18) This bit is set if the TouchPad has a middle button. If this bit is set, the TouchPad reports the middle button state in the appropriate place in the Relative mode packet, and in the Absolute mode packet (when Wmode=1). The middle button is not considered to be an extended button. 
capPassThrough (bit 7) This bit is set if the TouchPad uses the Pass-Through option. See section 5 for a complete description. 
capLowPower (bit 6) This feature allows the TouchPad to automatically reduce power when the device is not in use. Because it is automatic, there is no mode bit to control this option. 
capMultiFingerReport (bit 5) The capMultiFingerReport bit is set if the TouchPad supports Extended W mode and is able to report two finger locations in interleaved packets 
capSleep (bit 4) The capSleep bit is set if sleep mode is supported. 
capFourButtons (bit 3) This bit is set if the TouchPad is a MultiSwitch that supports four mouse buttons labeled Left, Right, Up, and Down. The Up and Down buttons are reported only during Absolute mode with the Wmode bit set. A four-button TouchPad takes the current value to report for the two extra buttons (Up and Down) and XORs them with the current value of the Right and Left buttons, as shown in Figure 3-4. The driver can decode the state of the two extra buttons by reversing this operation. Note that many devices are multi-button, rather than four-button. See Figure 4-16 for a description of the nExtendedButtons query. 
capBallistics (bit 2) This bit is only used by TouchStyks, which are described separately in the Synaptics TouchStyk Interfacing Guide (PN 511-000003-01). 
capMultiFinger (bit 1) This bit is set if multi-finger detection is supported. The TouchPad is then able to count the number of simultaneous fingers on the sensor and report the finger count via the W field of the Absolute packet. If this bit is 0, the TouchPad does not support multi-finger detection; any finger contact will be assumed to be a single finger. If capPalmDetect is set and multiple fingers are present, W reports a large width for the assumed single finger. 
capPalmDetect (bit 0) This bit is set if palm detection is supported. In W mode, the TouchPad measures the apparent size or width of the finger and reports the width in the W field of the Absolute mode packet. The host can use this information to help distinguish between intentional finger contact and accidental palm or hand contact. 
Extended W mode  (Multi fingers track)
The extended model ID query  contains an option for Extended W mode. To enter Extended W mode, the TouchPad must be configured with the Absolute Mode bit, Wmode bit and EWmode bit all set to 1. The EWmode is bit 2 of the TouchPad mode byte. Extended W mode encapsulates data into an absolute mode 6-byte PS/2 packet. In this mode, a W value of 2 indicates that this is an encapsulated packet and that the X, Y, and Z fields have all been redefined by the EW packet code. 
EW packet codes 0-7 return 30 bits of encapsulated data: 
Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 
Bit 7 
Bit 6 
Bit 5 
Bit 4 
Bit 3 
Bit 2 
Bit 1 
Bit 0 
¬ ¬ ¬
10 
¬ ¬ 	¬ ¬
0 
¬ 	¬
0 
¬ 	0 	¬ ¬
1 
¬ ¬ 	¬ ¬
Right 
¬ 	¬
Left 
¬ 	
¬
Defined by EW packet code 
¬ ¬ ¬ ¬ ¬ ¬ ¬ 							
¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬
Defined by EW packet code 
¬ ¬ 							
¬ ¬
11 
¬ ¬ 	¬ ¬
Defined by EW 
¬ ¬ 		¬
0 
¬ 	¬ ¬
0 
¬ ¬ 	¬
Right 
¬ 	¬
Left 
¬ 	
¬ ¬
Defined by EW packet code 
¬ ¬ ¬ ¬ ¬ ¬ 							
¬ ¬ ¬ ¬ ¬ ¬ ¬
EW packet code (0 – 7) 
¬ ¬ ¬ ¬ ¬ ¬ ¬ 			¬ ¬ ¬ ¬ ¬ ¬ ¬
Defined by EW packet code 
¬ ¬ ¬ ¬ ¬ ¬ ¬ 				

As the figure indicates, the definitions of the bits in Bytes 2, 3, 5, and parts of Bytes 4 and 6 are defined by the Packet Code in bits 7:4 of Byte 6. Three of the available packet codes are used: 
	•	0 – This code defines a scroll wheel packet, described in section 3.2.9.1.  
	•	1 – This code defines the secondary finger packet, described in section 3.2.9.2.  
	•	2 – This code defines finger state information