Lines Matching refs:button

43  * The state machine only affects the soft button area code.
133 libinput_timer_set(&t->button.timer,
142 libinput_timer_set(&t->button.timer,
157 libinput_timer_cancel(&t->button.timer);
159 t->button.state = new_state;
161 switch (t->button.state) {
163 t->button.current = 0;
166 t->button.current = BUTTON_EVENT_IN_AREA;
169 t->button.current = event;
174 t->button.current = event;
181 t->button.current = 0;
242 * Release any button in the bottom area, provided it started within a
255 if (t->button.state != BUTTON_STATE_BOTTOM ||
256 t->button.has_moved)
259 if (other_start_time > t->button.initial_time)
260 tdelta = other_start_time - t->button.initial_time;
262 tdelta = t->button.initial_time - other_start_time;
267 t->button.has_moved = true;
281 if (event != t->button.current)
300 t->button.initial_time);
327 if (event != t->button.current)
362 if (event != t->button.current)
396 if (event == t->button.current)
445 t->button.current = BUTTON_EVENT_IN_AREA;
460 enum button_state current = t->button.state;
462 switch(t->button.state) {
486 if (current != t->button.state)
488 "button state: touch %d from %-20s event %-24s to %-20s\n",
492 button_state_to_str(t->button.state));
502 if (t->button.has_moved)
505 switch (t->button.state) {
518 delta.x = t->point.x - t->button.initial.x;
519 delta.y = t->point.y - t->button.initial.y;
524 t->button.has_moved = true;
527 t->button.initial_time);
541 t->button.initial = t->point;
542 t->button.initial_time = time;
543 t->button.has_moved = false;
600 "received %s button event on a clickpad\n",
630 int mb_le, mb_re; /* middle button left/right edge */
635 /* button height: 10mm or 15% or the touchpad height,
653 /* The middle button is 25% of the touchpad and centered. Many
654 * touchpads don't have markings for the middle button at all so we
659 * middle button since users have a visual guide.
692 /* T440s has the top button line 5mm from the top, event
895 When enabled, the middle software button disappears */
901 /* init middle button emulation on non-clickpads, but only if we
902 * don't have a middle button. Exception: ALPS touchpads don't know
903 * if they have a middle button, so we always want the option there
931 /* A non-clickpad without a right button is a clickpad, assume the
934 * - The one-button Apple touchpad (discontinued in 2008) has a
935 * single physical button
941 "missing right button, assuming it is a clickpad.\n");
948 "clickpad advertising right button. "
949 "See %s/clickpad-with-right-button.html for details\n",
955 "non clickpad without right button?\n");
1001 "%s (%d) button",
1004 t->button.state = BUTTON_STATE_NONE;
1005 libinput_timer_init(&t->button.timer,
1018 libinput_timer_cancel(&t->button.timer);
1019 libinput_timer_destroy(&t->button.timer);
1026 uint32_t current, old, button;
1030 button = BTN_LEFT;
1043 b = evdev_to_left_handed(tp->device, button);
1050 button++;
1116 uint32_t button;
1153 case 1: button = BTN_LEFT; break;
1154 case 2: button = BTN_RIGHT; break;
1155 case 3: button = BTN_MIDDLE; break;
1157 button = 0;
1161 return button;
1167 uint32_t button,
1179 event = input_event_init(time, EV_KEY, button, value);
1191 /* Ignore button events not for the trackpoint while suspended */
1196 /* A button click always terminates edge scrolling, even if we
1197 * don't end up sending a button event. */
1201 * If the user has requested clickfinger replace the button chosen
1206 button = tp_clickfinger_set_button(tp);
1207 tp->buttons.active = button;
1209 if (!button)
1213 evdev_pointer_notify_button(tp->device, time, button, state);
1220 uint32_t current, old, button, is_top;
1249 switch (t->button.current) {
1285 button = BTN_MIDDLE;
1287 button = BTN_MIDDLE;
1289 button = BTN_RIGHT;
1291 button = BTN_LEFT;
1293 button = BTN_LEFT;
1301 button = evdev_to_left_handed(tp->device, button);
1303 tp->buttons.active = button;
1307 button = tp->buttons.active;
1316 if (button)
1319 button,
1338 return t->button.state == BUTTON_STATE_AREA || t->button.has_moved;