Bug 390096 - Display "new screen connected" OSD when laptop Display key is pressed
Summary: Display "new screen connected" OSD when laptop Display key is pressed
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.12.0
Platform: Neon Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Sebastian Kügler
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2018-02-08 19:36 UTC by Andrew Crouthamel
Modified: 2018-03-06 01:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-9450-0.html (1.44 KB, text/html)
2018-03-06 01:04 UTC, Andrew Crouthamel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Crouthamel 2018-02-08 19:36:22 UTC
When changing display layout on a laptop (pressing the Display key), it would be useful to have the Changing Display Layout notification that pops-up (picture of a display) explain with an icon, exactly what it is changing to, like other operating systems. Otherwise, it is a guessing game on whether you are extending your desktop, mirroring, turning of one display or the other, etc.

Furthermore, it would also be useful to have the Changing Display Layout notification remain for a second or two, allowing you to press the change display button again, cycling through the options until you find the one you want. Then when you release and wait a second, it proceeds to change to the display layout chosen, rather than immediately.
Comment 1 Nate Graham 2018-02-26 00:57:44 UTC
See also the OSD that just went in https://phabricator.kde.org/D9414

It would be really nice to display that when the Display key is pressed.
Comment 2 Sebastian Kügler 2018-02-26 11:09:26 UTC
Good idea, I'll look into that.
Comment 3 Sebastian Kügler 2018-02-27 17:19:10 UTC
https://phabricator.kde.org/D10896 implements this.
Comment 4 Andrew Crouthamel 2018-02-27 17:24:03 UTC
(In reply to Sebastian Kügler from comment #3)
> https://phabricator.kde.org/D10896 implements this.

That was fast! Tell me how to send you a beer!
Comment 5 Nate Graham 2018-02-27 17:33:20 UTC
Testing out the revision on your own hardware and leaving a review comment would probably be the most productive course of action! ;)

But I think all KDE developers should have a virtual "tip Jar". Would be a great way for other folks to show appreciation directly.
Comment 6 Sebastian Kügler 2018-02-27 18:19:07 UTC
@Andrew Email me for my physical address :)

(A donation to KDE e.V. is always appreciated.)
Comment 7 Andrew Crouthamel 2018-02-28 20:15:21 UTC
(In reply to Nate Graham from comment #5)
> Testing out the revision on your own hardware and leaving a review comment
> would probably be the most productive course of action! ;)
What's the best way to test this since it will need to test my hardware key? Is there a good procedure for these sorts of things that need hardware access? I guess a Neon Dev Unstable USB stick? But, I'd need to patch this code in. If anyone could help me out with a test procedure, I'd be glad to try it.
Comment 8 Sebastian Kügler 2018-02-28 20:34:21 UTC
Run xev, press the display button, paste the output from xev here and I'll tell you if it'll work. (XF86Display is the key code you're looking for, CTRL+P should also work.)

Alternatively, wait for the patch to land plus ~1 day and update from dev unstable packages or run the latest iso with those packages.
Comment 9 Andrew Crouthamel 2018-03-01 01:16:30 UTC
(In reply to Sebastian Kügler from comment #8)
> Run xev, press the display button, paste the output from xev here and I'll
> tell you if it'll work. (XF86Display is the key code you're looking for,
> CTRL+P should also work.)
> 
> Alternatively, wait for the patch to land plus ~1 day and update from dev
> unstable packages or run the latest iso with those packages.

Here is the display key:

KeyPress event, serial 40, synthetic NO, window 0x4800001,
    root 0x114, subw 0x0, time 542677, (661,760), root:(791,836),
    state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 40, synthetic NO, window 0x4800001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 40, synthetic NO, window 0x4800001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 40, synthetic NO, window 0x0,
    keys:  4294967261 0   0   0   2   0   0   0   0   0   0   0   0   0   0   0   
           32  0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   

KeyRelease event, serial 40, synthetic NO, window 0x4800001,
    root 0x114, subw 0x0, time 542744, (661,760), root:(791,836),
    state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
    XLookupString gives 1 bytes: (70) "p"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x4800001,
    root 0x114, subw 0x0, time 542744, (661,760), root:(791,836),
    state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False


And here is Super+P (same shortcut)

KeyPress event, serial 40, synthetic NO, window 0x4c00001,
    root 0x114, subw 0x0, time 754698, (2500,1125), root:(2630,1201),
    state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 40, synthetic NO, window 0x4c00001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 40, synthetic NO, window 0x4c00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 40, synthetic NO, window 0x0,
    keys:  2   0   0   0   2   0   0   0   0   0   0   0   0   0   0   0   
           32  0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   

KeyRelease event, serial 40, synthetic NO, window 0x4c00001,
    root 0x114, subw 0x0, time 754843, (2500,1125), root:(2630,1201),
    state 0x40, keycode 33 (keysym 0x70, p), same_screen YES,
    XLookupString gives 1 bytes: (70) "p"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x4c00001,
    root 0x114, subw 0x0, time 754959, (2500,1125), root:(2630,1201),
    state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
Comment 10 Sebastian Kügler 2018-03-01 09:47:59 UTC
Git commit eacbddd22d990d4f434b8b9aaab865d5ac62a630 by Sebastian Kügler.
Committed on 01/03/2018 at 09:47.
Pushed by sebas into branch 'master'.

Show config selection OSD when display button is pressed

Summary:
This makes the working of the display button much more intuitive.

Test Plan: Tested with external display plugged in, system behaves as expected

Reviewers: #plasma, dvratil

Reviewed By: dvratil

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10896

M  +3    -54   kded/daemon.cpp
M  +0    -4    kded/daemon.h

https://commits.kde.org/kscreen/eacbddd22d990d4f434b8b9aaab865d5ac62a630
Comment 11 Sebastian Kügler 2018-03-01 10:42:44 UTC
This should work. 

My own laptop has teh XF86Display keysym mapped, yours seems to have Super_L + p mapped (in both cases). Not long ago, to make work, we added a shortcut also for super+p to increase compatibility with Windowsy hardware (which seems to prefer super+p nowadays. In any case, if it doesn't work, you can always add a keymapping for XF86Display, but as I said, that shouldn't be necessary.
Comment 12 Andrew Crouthamel 2018-03-02 05:33:00 UTC
Looks like it works in my Dev Unstable VM, the display button passes through. I'll test via USB stick tomorrow, but otherwise, this looks good!
Comment 13 Andrew Crouthamel 2018-03-06 01:04:19 UTC
Created attachment 111208 [details]
attachment-9450-0.html

I tested this on real hardware (my XPS 13) and it works great! Thanks!


---
Andrew Crouthamel

On Thu, Mar 1, 2018 at 5:42 AM, Sebastian Kügler <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=390096
>
> --- Comment #11 from Sebastian Kügler <sebas@kde.org> ---
> This should work.
>
> My own laptop has teh XF86Display keysym mapped, yours seems to have
> Super_L +
> p mapped (in both cases). Not long ago, to make work, we added a shortcut
> also
> for super+p to increase compatibility with Windowsy hardware (which seems
> to
> prefer super+p nowadays. In any case, if it doesn't work, you can always
> add a
> keymapping for XF86Display, but as I said, that shouldn't be necessary.
>
> --
> You are receiving this mail because:
> You reported the bug.
>