trackpoints.html 10.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.13"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>libinput: Trackpoints and Pointing Sticks</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="bootstrap.css" rel="stylesheet" type="text/css"/>
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
<link href="libinputdoxygen.css" rel="stylesheet" type="text/css"/>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="doxy-boot.js"></script>
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">libinput 1.10.7</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="pointers.html">Mice, Trackballs, etc.</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Trackpoints and Pointing Sticks </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>This page provides an overview of trackpoint handling in libinput, also refered to as Pointing Stick or Trackstick.</p>
<p>The device itself is usually a round plastic stick between the G, H and B keys with a set of buttons below the space bar.</p>
<div class="image">
<object type="image/svg+xml" data="button-scrolling.svg">button-scrolling.svg</object>
<div class="caption">
A trackpoint</div></div>
<p> libinput always treats the buttons below the space bar as the buttons that belong to the trackpoint even on the few laptops where the buttons are not physically wired to the trackpoint device anyway, see <a class="el" href="t440_support.html">Lenovo *40 series touchpad support</a>.</p>
<p>Trackpoint devices have <a class="el" href="scrolling.html#button_scrolling">On-Button scrolling</a> enabled by default. This may interfer with middle-button dragging, if middle-button dragging is required by a user then button scrolling must be disabled.</p>
<h1><a class="anchor" id="trackpoint_range"></a>
Motion range on trackpoints</h1>
<p>It is difficult to associate motion on a trackpoint with a physical reference. Unlike mice or touchpads where the motion can be measured in mm, the trackpoint only responds to pressure. Without special equipment it is impossible to measure identical pressure values across multiple laptops.</p>
<p>The values provided by a trackpoint are motion deltas, usually corresponding to the pressure applied to the trackstick. For example, pressure towards the screen on a laptop provides negative y deltas at a fixed rate (e.g. every 10ms). As the pressure increases, the delta increases too. As the pressure decreases, the delta decreases until it hits the neutral state.</p>
<p>The delta range itself can vary greatly between laptops, some devices send a maximum delta value of 30, others can go beyond 100. To normalize the motion trackpoint, libinput uses the available delta range and fits its acceleration curve into this range. This requires calibration by the user, see <a class="el" href="trackpoints.html#trackpoint_range_measure">Measuring the trackpoint range</a>.</p>
<h1><a class="anchor" id="trackpoint_range_measure"></a>
Measuring the trackpoint range</h1>
<p>This section describes how to measure the trackpoint range and apply a hwdb entry to make this range known to libinput. libinput provides the tool <code>libinput measure trackpoint-range</code> for this task. This is an interactive tool and prints its instructions on the commandline. Example output from this tool is below:</p>
<div class="fragment"><div class="line">$ sudo libinput measure trackpoint-range</div><div class="line">This tool measures the commonly used pressure range of the</div><div class="line">trackpoint. Push the trackpoint:</div><div class="line">- Four times around the screen edges</div><div class="line">- From the top left to the bottom right and back, twice</div><div class="line">- From the top right to the bottom left and back, twice</div><div class="line">A minimum of 1000 events <span class="keywordflow">for each</span> axis is required</div><div class="line"></div><div class="line">Movements should emulate fast pointer movement on the screen</div><div class="line">but not use excessive pressure that would not be used</div><div class="line">during day-to-day movement. For best results, run <span class="keyword">this</span> tool</div><div class="line">several times to <span class="keyword">get</span> an idea of the common range.</div><div class="line"></div><div class="line">Trackpoint sends: max x: 19, max y: 23 samples [121, 121]</div></div><!-- fragment --><p>Once sufficient samples have been collected, the tool prints a simplified histogram for x and y axis deltas. This histogram should be used to <b>estimate</b> the appropriate trackpoint range. For example, let's look at the histogram below:</p>
<div class="fragment"><div class="line">Histogram <span class="keywordflow">for</span> x axis deltas, in counts of 5</div><div class="line"> -30:</div><div class="line"> -29:</div><div class="line"> -28: +</div><div class="line"> -27: +</div><div class="line"> -26: ++</div><div class="line"> -25: ++++</div><div class="line"> -24: +++++</div><div class="line"> -23: ++</div><div class="line"> -22: ++++++</div><div class="line"> -21: +++</div><div class="line"> -20: ++++</div><div class="line"> -19: +++++++</div><div class="line"> -18: ++++++++++++</div><div class="line"> -17: ++++++++++++</div><div class="line"> -16: ++++++++++++</div><div class="line"> -15: ++++</div><div class="line"> -14: +++++</div><div class="line"> -13: +++++</div><div class="line"> -12: ++++++</div><div class="line"> -11: +++++</div><div class="line"> -10: +++</div><div class="line">  -9: ++++</div><div class="line">  -8: +++++++</div><div class="line">  -7: +++++++</div><div class="line">  -6: ++++++++++++</div><div class="line">  -5: ++++++++++++</div><div class="line">  -4: ++++++++++++</div><div class="line">  -3: +++++++++</div><div class="line">  -2: +++++++++</div><div class="line">  -1: ++++++++</div><div class="line">   0: +++++++</div><div class="line">   1: +++++</div><div class="line">   2: +++++</div><div class="line">   3: ++++++</div><div class="line">   4: ++++++</div><div class="line">   5: +++++++</div><div class="line">   6: ++++</div><div class="line">   7: ++</div><div class="line">   8: +++</div><div class="line">   9: +++</div><div class="line">  10: +++</div><div class="line">  11: +++</div><div class="line">  12: +++</div><div class="line">  13: ++++</div><div class="line">  14: ++++++</div><div class="line">  15: ++++</div><div class="line">  16: ++++</div><div class="line">  17: ++++</div><div class="line">  18: ++++++</div><div class="line">  19: +++++++</div><div class="line">  20: ++++</div><div class="line">  21: ++++++</div><div class="line">  22: ++++++</div><div class="line">  23: ++++++</div><div class="line">  24: ++++++</div><div class="line">  25: +++++++++</div><div class="line">  26: +++++++</div><div class="line">  27: ++++++++</div><div class="line">  28: +++++</div><div class="line">  29: ++</div><div class="line">  30: ++</div><div class="line">  31: +</div><div class="line">  32:</div><div class="line">  33:</div><div class="line">  34:</div></div><!-- fragment --><p>The 0 delta is the neutral state, each + represents 5 events with that delta value. Note how the curve is distributed, it's not a classic bell curve. That can be a factor of the input provided or the firmware-based pointer acceleration.</p>
<p>Overall, the majority of events appear to be in the 0-25 range with a few outliers. So the trackpoint range libinput should use for this particular device would be 25. Note how there is a fair bit of guesswork involved, a trackpoint's data is never clean enough to get a definitive value. It is generally better to take a (slightly) smaller range than one too large.</p>
<p>The udev property to set is <code>LIBINPUT_ATTR_TRACKPOINT_RANGE=25</code>. See <a class="el" href="udev_config.html#hwdb_modifying">Modifying the hwdb</a> for details on how to apply this property. </p>
</div></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>