Introduce a dynamic enabled mode in virtual keyboard
AcceptedPublic

Authored by graesslin on Jan 1 2019, 4:23 PM.

Details

Reviewers
davidedmundson
Group Reviewers
KWin
Summary

The deynamic mode has the virtual keyboard enabled for touch events, but
disabled for all other input events. This is registered through an input
event spy. The boolean enabled is turned into a three state enum
disbaled, dynamic and enabled. The status notifier switches to the next
mode.

The dbus interface is not adjusted and still switches just between
enabled and disabled. According to lxr the dbus interface is not used
anywhere so there is the question whether it makes sense to update at
all.

Test Plan

Nested KWin session, verified that keyboard opens as expected

Diff Detail

Repository
R108 KWin
Branch
virtual-keyboard-dynamic
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7590
Build 7608: arc lint + arc unit
graesslin created this revision.Jan 1 2019, 4:23 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 1 2019, 4:23 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Jan 1 2019, 4:23 PM
mart added a subscriber: mart.Jan 9 2019, 3:40 PM

+1 for the idea,
shouldn't dynamic rather be default? any drawback?
is it supposed to be controlled only via the systray icon?

also wondering.. how does this relates with the global tabletmode switch? almost thinking that this global "tabletmode" state should depend firstly on the last tpoye of input events (mouse/keyboard vs touch) rather than that hardware switch, from an usability pow rather than "semantic correctness"

or a different way to see it would make the mode switch from dynamic to always enabled when the tablet mode switch goes in..

In D17900#389925, @mart wrote:

+1 for the idea,
shouldn't dynamic rather be default? any drawback?

The change makes it the default if we have an alphanumeric keyboard. If we don't have an alphanumeric keyboard the default is enabled.

is it supposed to be controlled only via the systray icon?

yes. Well there is the DBus interface, but we don't have any users. So my motivation to adjust the dbus protocol is rather low.

also wondering.. how does this relates with the global tabletmode switch? almost thinking that this global "tabletmode" state should depend firstly on the last tpoye of input events (mouse/keyboard vs touch) rather than that hardware switch, from an usability pow rather than "semantic correctness"

Nah, we cannot switch to tablet just because we interact with touch. Notebooks with touch are not tablets.

or a different way to see it would make the mode switch from dynamic to always enabled when the tablet mode switch goes in..

Certainly, that could be connected.

If there are no objections I'm going to push this

zzag added a subscriber: zzag.Jan 27 2019, 12:53 PM

If there are no objections I'm going to push this

I wish I could test this patch, but I don't own any device with touchscreen.

virtualkeyboard.cpp
176–187

Style.

544–545

Style.

graesslin updated this revision to Diff 50377.Jan 27 2019, 12:59 PM

Fix style - sorry that's $work coding style sneaking in

graesslin updated this revision to Diff 50378.Jan 27 2019, 1:02 PM

Now really update (git user error)

davidedmundson accepted this revision.Jun 12 2019, 12:03 AM
davidedmundson added a subscriber: davidedmundson.

Urgh, we need to be better at handling our review queue :/

virtualkeyboard.cpp
551

I prefer not putting default for a finite enum set, that way we get a warning if it goes out of sync.

This revision is now accepted and ready to land.Jun 12 2019, 12:03 AM