mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 11:30:06 +01:00
17 lines
588 B
Lua
17 lines
588 B
Lua
|
|
-- SPDX-License-Identifier: MIT
|
||
|
|
--
|
||
|
|
-- An example plugin to show how to disable an internal feature.
|
||
|
|
--
|
||
|
|
-- Typically one would expect the plugin to re-implement the feature
|
||
|
|
-- in a more device-specific manner but that's not done here.
|
||
|
|
|
||
|
|
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
|
||
|
|
-- libinput:register({1})
|
||
|
|
libinput:connect("new-evdev-device", function(device)
|
||
|
|
local udev_info = device:udev_properties()
|
||
|
|
if udev_info["ID_INPUT_TOUCHPAD"] then
|
||
|
|
log.info("Disabling palm detection on " .. device:name())
|
||
|
|
device:disable_feature("touchpad-palm-detection")
|
||
|
|
end
|
||
|
|
end)
|