Home | History | Annotate | Download | only in moused

Lines Matching defs:button

83 /* Abort 3-button emulation delay after this many movement events. */
219 /* Logitech MouseMan (new 4 button model) */
348 int zmap[4]; /* MOUSE_{X|Y}AXIS or a button number */
349 int wmode; /* wheel mode button number */
355 long button2timeout; /* 3 button emulation timeout */
380 /* button status */
383 struct timeval tv; /* timestamp on the last button event */
385 static struct button_state bstate[MOUSE_MAXBUTTON]; /* button state */
386 static struct button_state *mstate[MOUSE_MAXBUTTON];/* mapped button st.*/
389 /* state machine for 3 button emulation */
392 #define S1 1 /* button 1 delayed down */
393 #define S2 2 /* button 3 delayed down */
394 #define S3 3 /* both buttons down -> button 2 down */
395 #define S4 4 /* button 1 delayed up */
396 #define S5 5 /* button 1 down */
397 #define S6 6 /* button 3 down */
399 #define S8 8 /* button 3 delayed up */
400 #define S9 9 /* button 1 or 3 up after S3 */
662 * Use button i for negative Z axis movement and
663 * button (i + 1) for positive Z axis movement.
852 int button;
909 action0.button = action0.obutton;
915 action.flags, action.button, action.obutton);
917 action0.obutton = action0.button;
940 A(action0.button & MOUSE_BUTTON1DOWN,
941 action0.button & MOUSE_BUTTON3DOWN));
943 action.button, action.obutton);
946 action0.obutton = action0.button;
948 flags |= action.obutton ^ action.button;
954 action2.button, action2.dx, action2.dy, action2.dz);
957 printf("buttons=%x x=%d y=%d z=%d\n", action2.button,
967 button = lastbutton ^ action2.button;
968 lastbutton = action2.button;
969 printf("diff=%x buts=%x\n", button, lastbutton);
971 if ((button & (1<<i)) && dbg < 2) {
979 * button, we need to cook up a corresponding button `up' event
980 * after sending a button `down' event.
983 action.obutton = action.button;
987 action2.button, action2.dx, action2.dy, action2.dz);
995 mouse.u.data.buttons = action2.button;
1221 ** who don't have the middle button problem, can still specify
1225 ** plus a 4th byte for the middle button. However, the mouse might
1239 ** - 2 button 3 byte MicroSoft compatible protocol. Selected
1241 ** - 3 button 3+1 byte MicroSoft compatible protocol (default).
1293 * of the tablet. We only use this tablet for its 4-button puck
1518 * use them as package-header with no button pressed.
1545 * Hack for Logitech MouseMan Mouse - Middle button
1549 * middle button status changes.
1552 * and button info. Now post an event message with the old status
1553 * of the left and right buttons and the updated middle button.
1562 * HACK for ALPS "fourth button". (It's bit 0x10 of the "fourth byte"
1565 * to be extended so that it is identified as Button 4. The lower
1591 * button state (including the standard three), we ignore
1595 act->obutton = act->button;
1597 act->button = (1 << (rBuf - 13))
1600 * FIXME: this is a button "down" event. There needs to be
1601 * a corresponding button "up" event... XXX
1620 act->obutton = act->button;
1621 act->button = butmapintelli[(rBuf & MOUSE_MSS_BUTTONS) >> 4]
1627 act->obutton = act->button;
1628 act->button = butmapmss2[(rBuf & MOUSE_MSS_BUTTONS) >> 4]
1634 | (act->obutton ^ act->button);
1655 act->obutton = act->button;
1661 act->button = act->obutton & MOUSE_BUTTON4DOWN;
1663 act->button |= ((pBuf[0] & MOUSE_MSS_BUTTONS) == MOUSE_MSS_BUTTONS)
1667 act->button |= (act->obutton & MOUSE_BUTTON2DOWN)
1691 act->button = (act->obutton & (MOUSE_BUTTON2DOWN | MOUSE_BUTTON4DOWN))
1701 act->button = butmapmsc[(~pBuf[0]) & MOUSE_MSC_BUTTONS];
1707 act->button = butmaphit[pBuf[0] & 0x07];
1714 act->button = butmapmsc[pBuf[0] & MOUSE_MSC_BUTTONS];
1720 act->button = butmapversa[(pBuf[0] & MOUSE_VERSA_BUTTONS) >> 3];
1721 act->button |= (pBuf[0] & MOUSE_VERSA_TAP) ? MOUSE_BUTTON4DOWN : 0;
1745 act->button = butmapmsc[(~pBuf[0]) & MOUSE_MSC_BUTTONS];
1751 act->button = butmapps2[pBuf[0] & MOUSE_PS2_BUTTONS];
1758 * requests the level 2 at which wheel movement and additional button
1765 /* wheel and additional button data is in the fourth byte */
1768 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON4DOWN)
1770 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON5DOWN)
1780 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON4DOWN)
1782 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON5DOWN)
1789 /* the extended data packet encodes button and wheel events */
1801 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON4DOWN)
1803 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON5DOWN)
1834 act->button = act->obutton;
1841 /* preserve button states */
1842 act->button |= act->obutton & MOUSE_EXTBUTTONS;
1847 act->button |= ((pBuf[0] & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN;
1851 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON3DOWN)
1853 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON1DOWN)
1858 /* the fourth button state in the first byte */
1859 act->button |= (pBuf[0] & MOUSE_PS2_TAP) ? MOUSE_BUTTON4DOWN : 0;
1862 act->button = butmapversaps2[pBuf[0] & MOUSE_PS2VERSA_BUTTONS];
1863 act->button |=
1907 act->button |= MOUSE_BUTTON4DOWN;
1911 /* preserve previous button states */
1912 act->button |= act->obutton & MOUSE_EXTBUTTONS;
1922 act->button = butmapmsc[(~pBuf[0]) & MOUSE_SYS_STDBUTTONS];
1927 act->button |= ((~pBuf[7] & MOUSE_SYS_EXTBUTTONS) << 3);
1941 | (act->obutton ^ act->button);
1955 a2->obutton = a2->button;
1956 a2->button = a1->button;
1966 * Avoid re-ordering button and movement events. While a button
1969 * occur, then complete the deferred button events immediately.
1987 a2->button &=
1989 a2->button &= states[mouse_button_state].mask;
1990 a2->button |= states[mouse_button_state].buttons;
1992 flags |= a2->obutton ^ a2->button;
2002 /* phisical to logical button mapping */
2065 pbuttons = act1->button;
2068 act2->obutton = act2->button;
2118 act2->button = lbuttons;
2121 | (act2->obutton ^ act2->button);
2131 button;
2149 /* 3 button emulation timeout */
2154 button = MOUSE_BUTTON1DOWN;
2157 if (act->button & button) {
2158 /* the button is down */
2169 /* the button is up */
2173 if (act->button & button) {
2174 /* the button has been down */
2178 act->flags |= button;
2179 debug("button %d timeout", i + 1);
2182 /* the button has been up */
2185 button <<= 1;
2741 the proximity, tip and button info:
2743 (byte0 & 0x2) true = button pressed
2792 act->obutton = act->button;
2809 if (b_prev != 0 && b_prev != buf[0]) { /* possibly record button change */
2810 act->button = 0;
2812 act->button |= MOUSE_BUTTON1DOWN;
2813 if ( buf[0] & 0x02 ) /* button pressed */
2814 act->button |= MOUSE_BUTTON2DOWN;