Summary:
The Connection exposes a new service called org.kde.KWin.InputDevice
and every Device registers an own object exposing all properties.
This allows an external configuration tool to change the behavior of
the devices at runtime. E.g. to test configuration settings.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2407
From libinput documentation:
Also optional is a feature called "drag lock". With drag lock disabled,
lifting the finger will stop any drag process. When enabled, libinput
will ignore a finger up event during a drag process, provided the finger
is set down again within a implementation-specific timeout.
From libinput documentation:
A tap immediately followed by a finger down and that finger being held
down emulates a button press. Moving the finger around can thus drag
the selected item on the screen.
The capability tablet tool is new in Libinput 1.2. As build.kde.org
does not yet support this version, it's only an optional check.
So far the code only detects whether the capability exists and reports
this accordingly.
Summary:
Device has a static QVector<Device*> into which each created Device
is added and provides a static method to match a libinput_device* to
the already created Device.
This can be used by the the libinput Event class wrapper to properly
reference the Device the event is for.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1665
Summary:
The LibInput::Device provides a way to enable/disable the device.
This is used by the Connection to toggle all touchpad devices on/off
when the touchpad key is pressed. For this KWin "steals" the global
shortcuts from the touchpad kded.
Detecting what is a touchpad is unfortunately not tivial. The code
uses the following approach:
* it's a pointer
* it's not also a keyboard or touch screen
* it's at least one of the following:
** supports multiple tap fingers
** supports disable while typing
** supports disable on external mouse
If the code finds a touchpad and changes it's state successfully,
it triggers the touchpadEnabledChanged on Plasma's osdService.
Test Plan: Tested on notebook with toggle touchpad button
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1545
Summary:
The configuration file kcminput, group Mouse is parsed to decide whether
pointer devices should be in left handed mode. The config is applied
whenever a new device is added.
In addition the Connection listens to KGlobalSettings for a mouse
settings changed signal which might be emitted by the mouse KCM.
When such a signal is emitted, all pointer devices are reconfigured.
This allows to change the mouse handed settings on Wayland.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1543
Apparently libinput is too old and LIBINPUT_DEVICE_CAP_TABLET_TOOL is
not yet available. As we don't use it yet, it's put into the #if 0 part
for future use.
Summary:
The Device class wraps all the information we can get from libinput
about the device, like whether it's a keyboard, pointer, touch, etc.
In addition some more information is queried to figure out how "useful"
a device is. For a keyboard all alphanumeric keys are checked whether
they exist, for a pointer all (normal) buttons are queried.
All the information is exposed as Q_PROPERTY and used by the
DebugConsole. The DebugConsole gained a new tab "Input Devices" which
renders all devices and their properties in a tree view. When plugging
in/out a device, the model gets reset, so it's always up to date.
The new Device class can be used in future to configure the device,
e.g. disable touch pad, set mouse acceleration, etc.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1538