Lines Matching full:button

82 /* Abort 3-button emulation delay after this many movement events. */
273 /* Logitech MouseMan (new 4 button model) */
392 int zmap[4]; /* MOUSE_{X|Y}AXIS or a button number */
393 int wmode; /* wheel mode button number */
400 long button2timeout; /* 3 button emulation timeout */
438 /* button status */
441 struct timespec ts; /* timestamp on the last button event */
443 static struct button_state bstate[MOUSE_MAXBUTTON]; /* button state */
444 static struct button_state *mstate[MOUSE_MAXBUTTON];/* mapped button st.*/
447 /* state machine for 3 button emulation */
450 #define S1 1 /* button 1 delayed down */
451 #define S2 2 /* button 3 delayed down */
452 #define S3 3 /* both buttons down -> button 2 down */
453 #define S4 4 /* button 1 delayed up */
454 #define S5 5 /* button 1 down */
455 #define S6 6 /* button 3 down */
457 #define S8 8 /* button 3 delayed up */
458 #define S9 9 /* button 1 or 3 up after S3 */
697 * Use button i for negative Z axis movement and
698 * button (i + 1) for positive Z axis movement.
1065 action0.button = action0.obutton;
1071 action.flags, action.button, action.obutton);
1073 action0.obutton = action0.button;
1097 /* Allow middle button drags to scroll up and down */
1098 if (action0.button == MOUSE_BUTTON2DOWN) {
1105 action.flags, action.button, action.obutton);
1108 action.flags, action.button, action.obutton);
1110 /* This isn't a middle button down... move along... */
1113 * We were scrolling, someone let go of button 2.
1124 A(newaction.button & MOUSE_BUTTON1DOWN,
1125 action0.button & MOUSE_BUTTON3DOWN));
1128 newaction.button = MOUSE_BUTTON2DOWN;
1133 newaction.obutton = newaction.button;
1134 newaction.button = action0.button;
1142 A(action0.button & MOUSE_BUTTON1DOWN,
1143 action0.button & MOUSE_BUTTON3DOWN));
1145 action.button, action.obutton);
1147 action0.obutton = action0.button;
1149 flags |= action.obutton ^ action.button;
1155 action2.button, action2.dx, action2.dy, action2.dz);
1159 * If *only* the middle button is pressed AND we are moving
1163 /* Middle button down, waiting for movement threshold */
1263 mouse.u.data.buttons = action2.button;
1279 mouse.u.data.buttons = action2.button;
1296 * button, we need to cook up a corresponding button `up' event
1297 * after sending a button `down' event.
1300 action.obutton = action.button;
1304 action2.button, action2.dx, action2.dy, action2.dz);
1310 mouse.u.data.buttons = action2.button;
1598 ** who don't have the middle button problem, can still specify
1602 ** plus a 4th byte for the middle button. However, the mouse might
1616 ** - 2 button 3 byte MicroSoft compatible protocol. Selected
1618 ** - 3 button 3+1 byte MicroSoft compatible protocol (default).
1670 * of the tablet. We only use this tablet for it's 4-button puck
1895 * use them as package-header with no button pressed.
1922 * Hack for Logitech MouseMan Mouse - Middle button
1926 * middle button status changes.
1929 * and button info. Now post an event message with the old status
1930 * of the left and right buttons and the updated middle button.
1939 * HACK for ALPS "fourth button". (It's bit 0x10 of the "fourth byte"
1942 * to be extended so that it is identified as Button 4. The lower
1968 * button state (including the standard three), we ignore
1972 act->obutton = act->button;
1974 act->button = (1 << (rBuf - 13))
1977 * FIXME: this is a button "down" event. There needs to be
1978 * a corresponding button "up" event... XXX
1999 act->obutton = act->button;
2000 act->button = butmapintelli[(rBuf & MOUSE_MSS_BUTTONS) >> 4]
2006 act->obutton = act->button;
2007 act->button = butmapmss2[(rBuf & MOUSE_MSS_BUTTONS) >> 4]
2013 | (act->obutton ^ act->button);
2034 act->obutton = act->button;
2040 act->button = act->obutton & MOUSE_BUTTON4DOWN;
2042 act->button |= ((pBuf[0] & MOUSE_MSS_BUTTONS) == MOUSE_MSS_BUTTONS)
2046 act->button |= (act->obutton & MOUSE_BUTTON2DOWN)
2068 act->button = (act->obutton & (MOUSE_BUTTON2DOWN | MOUSE_BUTTON4DOWN))
2078 act->button = butmapmsc[(~pBuf[0]) & MOUSE_MSC_BUTTONS];
2089 act->button = MOUSE_BUTTON1DOWN;
2091 act->button = 0;
2095 act->button = butmaphit[pBuf[0] & 0x07];
2102 act->button = butmapmsc[pBuf[0] & MOUSE_MSC_BUTTONS];
2108 act->button = butmapversa[(pBuf[0] & MOUSE_VERSA_BUTTONS) >> 3];
2109 act->button |= (pBuf[0] & MOUSE_VERSA_TAP) ? MOUSE_BUTTON4DOWN : 0;
2132 act->button = butmapps2[pBuf[0] & MOUSE_PS2_BUTTONS];
2139 * requets the level 2 at which wheel movement and additional button
2146 /* wheel and additional button data is in the fourth byte */
2149 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON4DOWN)
2151 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON5DOWN)
2161 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON4DOWN)
2163 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON5DOWN)
2170 /* the extended data packet encodes button and wheel events */
2182 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON4DOWN)
2184 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON5DOWN)
2215 act->button = act->obutton;
2222 /* preserve button states */
2223 act->button |= act->obutton & MOUSE_EXTBUTTONS;
2228 act->button |= ((pBuf[0] & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN;
2232 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON3DOWN)
2234 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON1DOWN)
2239 /* the fourth button state in the first byte */
2240 act->button |= (pBuf[0] & MOUSE_PS2_TAP) ? MOUSE_BUTTON4DOWN : 0;
2243 act->button = butmapversaps2[pBuf[0] & MOUSE_PS2VERSA_BUTTONS];
2244 act->button |=
2288 act->button |= MOUSE_BUTTON4DOWN;
2292 /* preserve previous button states */
2293 act->button |= act->obutton & MOUSE_EXTBUTTONS;
2303 act->button = butmapmsc[(~pBuf[0]) & MOUSE_SYS_STDBUTTONS];
2308 act->button |= ((~pBuf[7] & MOUSE_SYS_EXTBUTTONS) << 3);
2322 | (act->obutton ^ act->button);
2336 a2->obutton = a2->button;
2337 a2->button = a1->button;
2347 * Avoid re-ordering button and movement events. While a button
2350 * occur, then complete the deferred button events immediately.
2368 a2->button &=
2370 a2->button &= states[mouse_button_state].mask;
2371 a2->button |= states[mouse_button_state].buttons;
2373 flags |= a2->obutton ^ a2->button;
2383 /* phisical to logical button mapping */
2446 pbuttons = act1->button;
2449 act2->obutton = act2->button;
2499 act2->button = lbuttons;
2502 | (act2->obutton ^ act2->button);
2512 int button;
2531 /* 3 button emulation timeout */
2536 button = MOUSE_BUTTON1DOWN;
2539 if (act->button & button) {
2540 /* the button is down */
2550 /* the button is up */
2554 if (act->button & button) {
2555 /* the button has been down */
2559 act->flags |= button;
2560 debug("button %d timeout", i + 1);
2563 /* the button has been up */
2566 button <<= 1;
2591 int button;
2599 button = MOUSE_BUTTON1DOWN;
2603 if (act->button & button) {
2604 /* the button is down */
2607 /* the button is up */
2611 mouse.u.event.id = button;
2615 debug("button %d count %d", i + 1, mouse.u.event.value);
2617 button <<= 1;
3171 the proximity, tip and button info:
3173 (byte0 & 0x2) true = button pressed
3222 act->obutton = act->button;
3239 if (b_prev != 0 && b_prev != buf[0]) { /* possibly record button change */
3240 act->button = 0;
3242 act->button |= MOUSE_BUTTON1DOWN;
3243 if (buf[0] & 0x02) /* button pressed */
3244 act->button |= MOUSE_BUTTON2DOWN;
3287 act->obutton = act->button;
3306 /* possibly record button change */
3308 act->button = 0;
3311 act->button |= MOUSE_BUTTON1DOWN;
3315 act->button |= MOUSE_BUTTON2DOWN;
3319 act->button |= MOUSE_BUTTON3DOWN;
3323 act->button |= MOUSE_BUTTON4DOWN;