detecting tablet mode
Martin Flöser
mgraesslin at kde.org
Tue Jan 9 19:06:19 UTC 2018
Am 2018-01-08 11:13, schrieb Marco Martin:
> On Fri, Jan 5, 2018 at 6:24 PM, Martin Flöser <mgraesslin at kde.org>
> wrote:
>> Am 2018-01-05 16:11, schrieb Marco Martin:
>>>
>>> debugging a bit what happens currently on my machine, i don't seem to
>>> have any event device which libinput_device_switch_has_switch,
>>> however, when i flip it, i do get an event, but oddly from the event
>>> device called
>>> "intel virtual button driver" and i get a key event of id 240.
>>> do you think it's a kernel problem and can'tbe made work on our
>>> level?
>>> I can also try to do the patch blindly, but how to test not having
>>> the
>>> proper hardware support? (on a running kwin, i know autotests have a
>>> fake libinput that injects events)
>>> I wonder on how many devices thoise events will actually work as
>>> intended...
>>
>>
>> From libinput documentation it seems to only be Lenovo Yoga currently.
>> And
>> you probably need a rather new kernel, maybe even unreleased ones.
>> This is a
>> pretty brand new feature in libinput and I don't think it's widely
>> exposed.
>>
>> Best ask Peter Hutterer, he will also be able to help you get your
>> device
>> supported so that we have it for everyone. I expect this will be a
>> great
>> crowd effort which should be doable. If we have the infrastructure and
>> easy
>> way to test/debug, we should be able to get some users to help there.
>
> is there also a mailinglist, either libinput or kernel related where
> this things are being
> discussed?
libinput is AFAIK on the wayland mailing list
>
> also, would it be possible with something like its autotests, to have
> a tiny root app
> that injects a fake event to have a good manual tests that can be ran
> on a running sessions?
Yes that's possible, but I always considered it out of scope for KWin.
See https://www.kernel.org/doc/html/v4.12/input/uinput.html for more
information. I have no idea how it actually works, I always worked on
the assumption that libinput is correct. In KWin itself we can fake
every event through KWin's Platform API. That's what's done in the
integration tests, though the switch events are not yet exposed.
Cheers
Martin
More information about the Plasma-devel
mailing list