1.. _clickpads_with_right_buttons: 2 3============================================================================== 4Clickpads with a fake right button 5============================================================================== 6 7libinput relies on the kernel to label :ref:`Clickpads <touchpads_buttons_clickpads>` 8with the ``INPUT_PROP_BUTTONPAD`` property so it can enable the correct 9:ref:`clickpad_softbuttons`. Clickpads are not expected to have a right button 10since the whole surface can be depressed. 11 12A common bug encountered with :ref:`Clickpads <touchpads_buttons_clickpads>` 13is that the device advertises a physical right button where no such button 14exists. This is usually a bug in the firmware of the device and causes the 15following warning to be emitted by libinput:: 16 17 "<device name> clickpad advertising right button" 18 19The user-visible effect of this is usually negligible since these devices 20cannot actually trigger a right click and libinput's default behaviors for 21clickpads work as expected. 22 23However, we should nonetheless correct the device to get rid of this warning 24and avoid potential issues with future features. The :ref:`device-quirks` 25provide a simple way to disable the fake right button on the device. The 26following quirk disables the right button on the MyModel laptop from the 27MyVendor OEM:: 28 29 [MyVendor MyModel Touchpad] 30 MatchName=Foo Bar Touchpad 31 MatchUdevtype=touchpad 32 MatchDMIModAlias=dmi:*svnMyVendor:pnMyModel:* 33 AttrEventCode=-BTN_RIGHT 34 35The name of the device can be obtained using :ref:`libinput record <libinput-record>`, 36the modalias match is a shell-style glob against the value of ``/sys/class/dmi/id/modalias``. 37In most cases, matching should be against ``svn`` (system vendor) and one of 38``pn`` (product name) or ``pvr`` (product version), whichever provides a 39useful description of the individual laptop model. See the 40:ref:`device-quirks` documentation for details on testing local quirks. 41 42For reference, some example commits that add such a quirk are: 43 44 - `bf61ab9bb0694d0ac3d60a7f815779abfe4886e6 <https://gitlab.freedesktop.org/libinput/libinput/-/commit/bf61ab9bb0694d0ac3d60a7f815779abfe4886e6>`__ 45 - `74fac6d040ac62048882dfb6f73da567ace6a6f5 <https://gitlab.freedesktop.org/libinput/libinput/-/commit/74fac6d040ac62048882dfb6f73da567ace6a6f5>`__ 46 - `89cd0f990e3bee9906754d6ca8484ed5aa392249 <https://gitlab.freedesktop.org/libinput/libinput/-/commit/89cd0f990e3bee9906754d6ca8484ed5aa392249>`__ 47 48