Send a Qt::Key_PowerDown when long pressing the power button
ClosedPublic

Authored by apol on Jan 24 2020, 6:04 PM.

Details

Summary

This will be useful to be able to show a menu on long press and just
lock the screen on normal press, especially useful on phones and
tablets.

Test Plan

Could not test much because on laptops doesn't work. Would need more
investigation. discussed further on the plasma mailing list.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Jan 24 2020, 6:04 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 24 2020, 6:04 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
apol requested review of this revision.Jan 24 2020, 6:04 PM

Concept ++

Kwin has a concept of an InputEventFilter which will allow for doing this sort of things without putting specifics in the main core
See something like VirtualTerminalFilter

apol added a comment.Jan 24 2020, 11:03 PM

Concept ++

Kwin has a concept of an InputEventFilter which will allow for doing this sort of things without putting specifics in the main core
See something like VirtualTerminalFilter

This code is in the GlobalShortcutFilter already. Do you want to have a PowerButtonGlobalShortcutFilter and NonPowerButtonGlobalShortcutFilter?

Aleix

davidedmundson accepted this revision.Jan 24 2020, 11:58 PM

Oh, I apologise.

Kwin seem too like really long files which is hard to read in phabricator.

This revision is now accepted and ready to land.Jan 24 2020, 11:58 PM
z3ntu added a subscriber: z3ntu.Jan 25 2020, 1:57 PM
This revision was automatically updated to reflect the committed changes.