Commit 10293ef1 authored by Peter Hutterer's avatar Peter Hutterer

libinput: 1.11.1 docs

parent 399627ac
<!-- 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.14"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>libinput: /home/whot/code/libinput/README.md File Reference</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" async 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.11.1</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.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">/home/whot/code/libinput/README.md File Reference</div> </div>
</div><!--header-->
<div class="contents">
</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.14
</small></address>
</body>
</html>
<!-- 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.14"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>libinput: /home/whot/code/libinput/doc/absolute-axes.dox File Reference</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" async 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.11.1</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.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">/home/whot/code/libinput/doc/absolute-axes.dox File Reference</div> </div>
</div><!--header-->
<div class="contents">
</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.14
</small></address>
</body>
</html>
<!-- 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.14"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>libinput: /home/whot/code/libinput/doc/absolute-coordinate-ranges.dox File Reference</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" async 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.11.1</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.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">/home/whot/code/libinput/doc/absolute-coordinate-ranges.dox File Reference</div> </div>
</div><!--header-->
<div class="contents">
</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.14
</small></address>
</body>
</html>
<!-- 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.14"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>libinput: Absolute axes</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" async 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.11.1</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.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="touchscreens.html">Touchscreens</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Absolute axes </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><br />
</p>
<p>Devices with absolute axes are those that send positioning data for an axis in a device-specific coordinate range, defined by a minimum and a maximum value.</p>
<p>Compare this to relative devices (e.g. a mouse) that can only detect directional data, not positional data.</p>
<p>libinput supports three types of devices with absolute axes:</p>
<ul>
<li>multi-touch screens</li>
<li>single-touch screens</li>
<li><a class="el" href="tablet-support.html">graphics tablets</a></li>
</ul>
<p>Touchpads are technically absolute devices but libinput converts the axis values to directional motion and posts events as relative events. Touchpads do not count as absolute devices in libinput.</p>
<p>For all absolute devices in libinput, the default unit for x/y coordinates is in mm off the top left corner on the device, or more specifically off the device's sensor. If the device is physically rotated from its natural position and this rotation was communicated to libinput (e.g. <a class="el" href="group__config.html#ga9bbdef04c07804ce7c121133c04d4edf">by setting the device left-handed</a>), the coordinate origin is the top left corner of in the current rotation.</p>
<h1><a class="anchor" id="absolute_axes_handling"></a>
Handling of absolute coordinates</h1>
<p>In most use-cases, absolute input devices are mapped to a single screen. For direct input devices such as touchscreens the aspect ratio of the screen and the device match. Mapping the input device position to the output position is thus a simple mapping between two coordinates. libinput provides the API for this with</p>
<ul>
<li><a class="el" href="group__event__pointer.html#ga26fa3d0b2bcc7f0a7939b84dc8207021" title="Return the current absolute x coordinate of the pointer event, transformed to screen coordinates...">libinput_event_pointer_get_absolute_x_transformed()</a> for pointer events</li>
<li><a class="el" href="group__event__touch.html#gadd04ccc3a7b4564e5aca3c8592f090fe" title="Return the current absolute x coordinate of the touch event, transformed to screen coordinates...">libinput_event_touch_get_x_transformed()</a> for touch events</li>
</ul>
<p>libinput's API only provides the call to map into a single coordinate range. If the coordinate range has an offset, the compositor is responsible for applying that offset after the mapping. For example, if the device is mapped to the right of two outputs, add the output offset to the transformed coordinate.</p>
<h1><a class="anchor" id="absolute_axes_nores"></a>
Devices without x/y resolution</h1>
<p>An absolute device that does not provide a valid resolution is considered buggy and must be fixed in the kernel. Some touchpad devices do not provide resolution, those devices are correctly handled within libinput (touchpads are not absolute devices, as mentioned above).</p>
<h1><a class="anchor" id="calibration"></a>
Calibration of absolute devices</h1>
<p>Absolute devices may require calibration to map precisely into the output range required. This is done by setting a transformation matrix, see <a class="el" href="group__config.html#ga09a798f58cc601edd2797780096e9804" title="Apply the 3x3 transformation matrix to absolute device coordinates. ">libinput_device_config_calibration_set_matrix()</a> which is applied to each input coordinate.</p>
<p class="formulaDsp">
\[ \begin{pmatrix} cos\theta &amp; -sin\theta &amp; xoff \\ sin\theta &amp; cos\theta &amp; yoff \\ 0 &amp; 0 &amp; 1 \end{pmatrix} \begin{pmatrix} x \\ y \\ 1 \end{pmatrix} \]
</p>
<p>\(\theta\) is the rotation angle. The offsets \(xoff\) and \(yoff\) are specified in device dimensions, i.e. a value of 1 equals one device width or height. Note that rotation applies to the device's origin, rotation usually requires an offset to move the coordinates back into the original range.</p>
<p>The most common matrices are:</p>
<ul>
<li>90 degree clockwise: \( \begin{pmatrix} 0 &amp; -1 &amp; 1 \\ 1 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 1 \end{pmatrix} \)</li>
<li>180 degree clockwise: \( \begin{pmatrix} -1 &amp; 0 &amp; 1 \\ 0 &amp; -1 &amp; 1 \\ 0 &amp; 0 &amp; 1 \end{pmatrix} \)</li>
<li>270 degree clockwise: \( \begin{pmatrix} 0 &amp; 1 &amp; 0 \\ -1 &amp; 0 &amp; 1 \\ 0 &amp; 0 &amp; 1 \end{pmatrix} \)</li>
<li>reflection along y axis: \( \begin{pmatrix} -1 &amp; 0 &amp; 1 \\ 1 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 1 \end{pmatrix} \)</li>
</ul>
<p>See Wikipedia's <a href="http://en.wikipedia.org/wiki/Transformation_matrix">Transformation Matrix article</a> for more information on the matrix maths. See <a class="el" href="group__config.html#ga3d9f1b9be10e804e170c4ea455bd1f1b" title="Return the default calibration matrix for this device. ">libinput_device_config_calibration_get_default_matrix()</a> for how these matrices must be supplied to libinput.</p>
<p>Once applied, any x and y axis value has the calibration applied before it is made available to the caller. libinput does not provide access to the raw coordinates before the calibration is applied.</p>
<h1><a class="anchor" id="absolute_axes_nonorm"></a>
Why x/y coordinates are not normalized</h1>
<p>x/y are not given in <a class="el" href="motion_normalization.html">normalized coordinates</a> ([0..1]) for one simple reason: the aspect ratio of virtually all current devices is something other than 1:1. A normalized axes thus is only useful to determine that the stylus is e.g. at 78% from the left, 34% from the top of the device. Without knowing the per-axis resolution, these numbers are meaningless. Worse, calculation based on previous coordinates is simply wrong: a movement from 0/0 to 50%/50% is not a 45% degree line.</p>
<p>This could be alleviated by providing resolution and information about the aspect ratio to the caller. Which shifts processing and likely errors into the caller for little benefit. Providing the x/y axes in mm from the outset removes these errors. </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.14
</small></address>
</body>
</html>
<!-- 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.14"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>libinput: Coordinate ranges for absolute axes</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" async 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.11.1</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.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="touchpads.html">Touchpads</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Coordinate ranges for absolute axes </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><br />
</p>
<p>libinput requires that all touchpads provide a correct axis range and resolution.</p>
<p>These are used to enable or disable certain features or adapt the interaction with the touchpad. For example, the software button area is narrower on small touchpads to avoid reducing the interactive surface too much. Likewise, palm detection works differently on small touchpads as palm interference is less likely to happen.</p>
<p>Touchpads with incorrect axis ranges generate error messages in the form: </p><blockquote class="doxtable">
<p>Axis 0x35 value 4000 is outside expected range [0, 3000] </p>
</blockquote>
<p>This error message indicates that the ABS_MT_POSITION_X axis (i.e. the x axis) generated an event outside the expected range of 0-3000. In this case the value was 4000. This discrepancy between the coordinate range the kernels advertises vs. what the touchpad sends can be the source of a number of perceived bugs in libinput.</p>
<h1><a class="anchor" id="absolute_coordinate_ranges_fix"></a>
Measuring and fixing touchpad ranges</h1>
<p>To fix the touchpad you need to:</p><ol type="1">
<li>measure the physical size of your touchpad in mm</li>
<li>run touchpad-edge-detector</li>
<li>trim the udev match rule to something sensible</li>
<li>replace the resolution with the calculated resolution based on physical settings</li>
<li>test locally</li>
<li>send a patch to the systemd project</li>
</ol>
<p>Detailed explanations are below.</p>
<p><a href="http://freedesktop.org/wiki/Software/libevdev/">libevdev</a> provides a tool called <b>touchpad-edge-detector</b> that allows measuring the touchpad's input ranges. Run the tool as root against the device node of your touchpad device and repeatedly move a finger around the whole outside area of the touchpad. Then control+c the process and note the output. An example output is below:</p>
<div class="fragment"><div class="line">$&gt; sudo touchpad-edge-detector /dev/input/event4</div><div class="line">Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event4</div><div class="line">Move one finger around the touchpad to detect the actual edges</div><div class="line">Kernel says: x [1024..3112], y [2024..4832]</div><div class="line">Touchpad sends: x [2445..4252], y [3464..4071]</div><div class="line"></div><div class="line">Touchpad size as listed by the kernel: 49x66mm</div><div class="line">Calculate resolution as:</div><div class="line"> x axis: 2088/&lt;width in mm&gt;</div><div class="line"> y axis: 2808/&lt;height in mm&gt;</div><div class="line"></div><div class="line">Suggested udev rule:</div><div class="line"><span class="preprocessor"># &lt;Laptop model description goes here&gt;</span></div><div class="line">evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvnLENOVO:bvrGJET72WW(2.22):bd02/21/2014:svnLENOVO:pn20ARS25701:pvrThinkPadT440s:rvnLENOVO:rn20ARS25701:rvrSDK0E50512STD:cvnLENOVO:ct10:cvrNotAvailable:*</div><div class="line"> EVDEV_ABS_00=2445:4252:&lt;x resolution&gt;</div><div class="line"> EVDEV_ABS_01=3464:4071:&lt;y resolution&gt;</div><div class="line"> EVDEV_ABS_35=2445:4252:&lt;x resolution&gt;</div><div class="line"> EVDEV_ABS_36=3464:4071:&lt;y resolution&gt;</div></div><!-- fragment --><p>Note the discrepancy between the coordinate range the kernels advertises vs. what the touchpad sends. To fix the advertised ranges, the udev rule should be taken and trimmed before being sent to the <a href="https://github.com/systemd/systemd">systemd project</a>. An example commit can be found <a href="https://github.com/systemd/systemd/commit/26f667eac1c5e89b689aa0a1daef6a80f473e045">here</a>.</p>
<p>In most cases the match can and should be trimmed to the system vendor (svn) and the product version (pvr), with everything else replaced by a wildcard (*). In this case, a Lenovo T440s, a suitable match string would be:</p><div class="fragment"><div class="line">evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrThinkPadT440s*</div></div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>hwdb match strings only allow for alphanumeric ascii characters. Use a wildcard (* or ?, whichever appropriate) for special characters.</dd></dl>
<p>The actual axis overrides are in the form: </p><div class="fragment"><div class="line"><span class="preprocessor"># axis number=min:max:resolution</span></div><div class="line"><span class="preprocessor"> EVDEV_ABS_00=2445:4252:42</span></div></div><!-- fragment --><p> or, if the range is correct but the resolution is wrong </p><div class="fragment"><div class="line"><span class="preprocessor"># axis number=::resolution</span></div><div class="line"><span class="preprocessor"> EVDEV_ABS_00=::42</span></div></div><!-- fragment --><p>Note the leading single space. The axis numbers are in hex and can be found in <em>linux/input-event-codes.h</em>. For touchpads ABS_X, ABS_Y, ABS_MT_POSITION_X and ABS_MT_POSITION_Y are required.</p>
<dl class="section note"><dt>Note</dt><dd>The touchpad's ranges and/or resolution should only be fixed when there is a significant discrepancy. A few units do not make a difference and a resolution that is off by 2 or less usually does not matter either.</dd></dl>
<p>Once a match and override rule has been found, follow the instructions at the top of the <a href="https://github.com/systemd/systemd/blob/master/hwdb/60-evdev.hwdb">60-evdev.hwdb</a> file to save it locally and trigger the udev hwdb reload. Rebooting is always a good idea. If the match string is correct, the new properties will show up in the output of </p><div class="fragment"><div class="line">udevadm info /sys/<span class="keyword">class</span>/input/event4</div></div><!-- fragment --><p>Adjust the command for the event node of your touchpad. A udev builtin will apply the new axis ranges automatically.</p>
<p>When the axis override is confirmed to work, please submit it as a pull request to the <a href="https://github.com/systemd/systemd">systemd project</a>. </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.14
</small></address>
</body>
</html>
<!-- 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.14"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>libinput: Data Structures</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" async 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.11.1</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.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Data Structures</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput.html" target="_self">libinput</a></td><td class="desc">A handle for accessing libinput </td></tr>
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__device.html" target="_self">libinput_device</a></td><td class="desc">A base handle for accessing libinput devices </td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__device__group.html" target="_self">libinput_device_group</a></td><td class="desc">A base handle for accessing libinput device groups </td></tr>
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__event.html" target="_self">libinput_event</a></td><td class="desc">The base event type </td></tr>
<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__event__device__notify.html" target="_self">libinput_event_device_notify</a></td><td class="desc">An event notifying the caller of a device being added or removed </td></tr>
<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__event__keyboard.html" target="_self">libinput_event_keyboard</a></td><td class="desc">A keyboard event representing a key press/release </td></tr>
<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__event__pointer.html" target="_self">libinput_event_pointer</a></td><td class="desc">A pointer event representing relative or absolute pointer movement, a button press/release or scroll axis events </td></tr>
<tr id="row_7_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__event__switch.html" target="_self">libinput_event_switch</a></td><td class="desc">A switch event representing a changed state in a switch </td></tr>
<tr id="row_8_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__event__tablet__pad.html" target="_self">libinput_event_tablet_pad</a></td><td class="desc">Tablet pad event representing a button press, or ring/strip update on the tablet pad itself </td></tr>
<tr id="row_9_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__event__tablet__tool.html" target="_self">libinput_event_tablet_tool</a></td><td class="desc">Tablet tool event representing an axis update, button press, or tool update </td></tr>
<tr id="row_10_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__event__touch.html" target="_self">libinput_event_touch</a></td><td class="desc">Touch event representing a touch down, move or up, as well as a touch cancel and touch frame events </td></tr>
<tr id="row_11_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__interface.html" target="_self">libinput_interface</a></td><td class="desc">Libinput does not open file descriptors to devices directly, instead <a class="el" href="structlibinput__interface.html#ae445aaa330e4eb7df6650fbc6428022a" title="Open the device at the given path with the flags provided and return the fd. ">open_restricted()</a> and <a class="el" href="structlibinput__interface.html#af78e15d6a06bc928d8679b587bb4e8fa" title="Close the file descriptor. ">close_restricted()</a> are called for each path that must be opened </td></tr>
<tr id="row_12_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__seat.html" target="_self">libinput_seat</a></td><td class="desc">The base handle for accessing libinput seats </td></tr>
<tr id="row_13_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__tablet__pad__mode__group.html" target="_self">libinput_tablet_pad_mode_group</a></td><td class="desc">A mode on a tablet pad is a virtual grouping of functionality, usually based on some visual feedback like LEDs on the pad </td></tr>
<tr id="row_14_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlibinput__tablet__tool.html" target="_self">libinput_tablet_tool</a></td><td class="desc">An object representing a tool being used by a device with the <a class="el" href="group__device.html#gga3110cdddce94a1df0b8a3306909c8f15ad3eafb7274a330c5839f00030850db6d">LIBINPUT_DEVICE_CAP_TABLET_TOOL</a> capability </td></tr>
</table>
</div><!-- directory -->
</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.14
</small></address>
</body>
</html>
This diff is collapsed.
<!-- 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.14"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>libinput: /home/whot/code/libinput/doc/architecture.dox File Reference</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" async 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.11.1</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;">