• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.. _t440_support:
2
3==============================================================================
4Lenovo \*40 series touchpad support
5==============================================================================
6
7The Lenovo \*40 series emulates trackstick buttons on the top part of the
8touchpads.
9
10.. _t440_support_overview:
11
12------------------------------------------------------------------------------
13Overview
14------------------------------------------------------------------------------
15
16The Lenovo \*40 series introduced a new type of touchpad. Previously, all
17laptops had a separate set of physical buttons for the
18`trackstick <http://en.wikipedia.org/wiki/Pointing_stick>`_. This
19series removed these buttons, relying on a software emulation of the top
20section of the touchpad. This is visually marked on the trackpad itself,
21and clicks can be triggered by pressing the touchpad down with a finger in
22the respective area:
23
24.. figure:: top-software-buttons.svg
25    :align: center
26
27    Left, right and middle-button click with top software button areas
28
29This page only covers the top software buttons, the bottom button behavior
30is covered in :ref:`Clickpad software buttons <clickpad_softbuttons>`.
31
32Clickpads with a top button area are marked with the
33`INPUT_PROP_TOPBUTTONPAD <https://www.kernel.org/doc/Documentation/input/event-codes.txt>`_
34property.
35
36.. _t440_support_btn_size:
37
38------------------------------------------------------------------------------
39Size of the buttons
40------------------------------------------------------------------------------
41
42The size of the buttons matches the visual markings on this touchpad.
43The width of the left and right buttons is approximately 42% of the
44touchpad's width, the middle button is centered and assigned 16% of the
45touchpad width.
46
47The line of the buttons is 5mm from the top edge of the touchpad,
48measurements of button presses showed that the size of the buttons needs to
49be approximately 10mm high to work reliable (especially when using the
50thumb to press the button).
51
52.. _t440_support_btn_behavior:
53
54------------------------------------------------------------------------------
55Button behavior
56------------------------------------------------------------------------------
57
58Movement in the top button area does not generate pointer movement. These
59buttons are not replacement buttons for the bottom button area but have
60their own behavior. Semantically attached to the trackstick device, libinput
61re-routes events from these buttons to appear through the trackstick device.
62
63
64.. graphviz::
65
66
67    digraph top_button_routing
68    {
69	rankdir="LR";
70	node [shape="box";]
71
72	trackstick [label="trackstick kernel device"];
73	touchpad [label="touchpad kernel device"];
74
75	subgraph cluster0 {
76		bgcolor = floralwhite
77		label = "libinput"
78
79		libinput_ts [label="trackstick libinput_device"
80			     style=filled
81			     fillcolor=white];
82		libinput_tp [label="touchpad libinput_device"
83			     style=filled
84			     fillcolor=white];
85
86		libinput_tp -> libinput_ts [constraint=false
87					    color="red4"];
88	}
89
90	trackstick -> libinput_ts [arrowhead="none"]
91	touchpad -> libinput_tp [color="red4"]
92
93	events_tp [label="other touchpad events"];
94	events_topbutton [label="top software button events"];
95
96	libinput_tp -> events_tp [arrowhead="none"]
97	libinput_ts -> events_topbutton [color="red4"]
98    }
99
100
101
102The top button areas work even if the touchpad is disabled but will be
103disabled when the trackstick device is disabled. If the finger starts inside
104the top area and moves outside the button area the finger is treated as dead
105and must be lifted to generate future buttons.  Likewise, movement into the
106top button area does not trigger button events, a click has to start inside
107this area to take effect.
108
109.. _t440_support_identification:
110
111------------------------------------------------------------------------------
112Kernel support
113------------------------------------------------------------------------------
114
115The firmware on the first generation of touchpads providing top software
116buttons is buggy and announces wrong ranges.
117`Kernel patches <https://lkml.org/lkml/2014/3/7/722>`_ are required;
118these fixes are available in kernels 3.14.1, 3.15 and later but each
119touchpad needs a separate fix.
120
121The October 2014 refresh of these laptops do not have this firmware bug
122anymore and should work without per-device patches, though
123`this kernel commit <http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=02e07492cdfae9c86e3bd21c0beec88dbcc1e9e8>`_
124is required.
125
126For a complete list of supported touchpads check
127`the kernel source <http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/input/mouse/synaptics.c>`_
128(search for "topbuttonpad_pnp_ids").
129