Bug 484597 - PrintScreen shortcut lost during upgrade
Summary: PrintScreen shortcut lost during upgrade
Status: REPORTED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 24.02.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
: 487397 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-27 13:11 UTC by Szőts Ákos
Modified: 2025-02-09 16:45 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Shortcuts screenshot (140.43 KB, image/png)
2024-03-27 18:13 UTC, Szőts Ákos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Szőts Ákos 2024-03-27 13:11:38 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY

If I press the "Print screen" button on my keyboard, nothing happens.

EXPECTED RESULT

Spectacle starts

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240318
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-1-default (64-bit)
Graphics Platform: X11
Comment 1 Szőts Ákos 2024-03-27 13:15:31 UTC
I came from an old KDE installation, so it's not a fresh install.
Comment 2 fanzhuyifan 2024-03-27 15:53:34 UTC
Could you go to system settings - shortcuts - spectacle, and provide a screenshot of what shortcuts spectacle has assigned? (In particular check Default Shortcuts to see if it has print assigned)

If you run xev, and press the Print key, what do you see printed in the console?
Comment 3 Szőts Ákos 2024-03-27 18:13:58 UTC
Created attachment 167855 [details]
Shortcuts screenshot

It says Meta+Shift+Print. I'm 99% sure that I haven't set this shortcut.

I'm sorry that it's in Hungarian, but for some reason `LC_ALL=C.UTF-8 systemsettings` doesn't change the individual KCM pages to English (just the main window). I hope that the localisation doesn't change the order and you can match with your setup.

This is what xev reports back for pressing and releasing the print screen button:

KeyPress event, serial 41, synthetic NO, window 0x4400001,
    root 0x1e1, subw 0x0, time 60011851, (1094,485), root:(1097,521),
    state 0x10, keycode 107 (keysym 0xff61, Print), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x4400001,
    root 0x1e1, subw 0x0, time 60011971, (1094,485), root:(1097,521),
    state 0x10, keycode 107 (keysym 0xff61, Print), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
Comment 4 fanzhuyifan 2024-03-27 18:59:11 UTC
(In reply to Szőts Ákos from comment #3)
> Created attachment 167855 [details]
> Shortcuts screenshot
> 
> It says Meta+Shift+Print. I'm 99% sure that I haven't set this shortcut.
> 
> I'm sorry that it's in Hungarian, but for some reason `LC_ALL=C.UTF-8
> systemsettings` doesn't change the individual KCM pages to English (just the
> main window). I hope that the localisation doesn't change the order and you
> can match with your setup.
> 
> This is what xev reports back for pressing and releasing the print screen
> button:
> 
> KeyPress event, serial 41, synthetic NO, window 0x4400001,
>     root 0x1e1, subw 0x0, time 60011851, (1094,485), root:(1097,521),
>     state 0x10, keycode 107 (keysym 0xff61, Print), same_screen YES,
>     XLookupString gives 0 bytes: 
>     XmbLookupString gives 0 bytes: 
>     XFilterEvent returns: False
> 
> KeyRelease event, serial 41, synthetic NO, window 0x4400001,
>     root 0x1e1, subw 0x0, time 60011971, (1094,485), root:(1097,521),
>     state 0x10, keycode 107 (keysym 0xff61, Print), same_screen YES,
>     XLookupString gives 0 bytes: 
>     XFilterEvent returns: False

For "Spectacle", is "Print" selected as the default shortcut? Also, it would be great if you could upload the content of your  `~/.config/kglobalshortcutsrc`.

Just looking at the screenshot, it seems that `Print` is not assigned as a shortcut for anything. So spectacle doesn't launch when you press print. It should be the default shortcut for "Spectacle". Maybe you removed that at some point?
Comment 5 Szőts Ákos 2024-03-27 20:02:31 UTC
This is the relevant section for Spectacle from the file:

[services][org.kde.spectacle.desktop]
ActiveWindowScreenShot=none
FullScreenScreenShot=none
RectangularRegionScreenShot=none
_launch=Meta+Shift+Print

Apart from it, do you need the full config file?

I remember Print Screen disappeared (or never appeared) during the change of KSnapshot -> Spectacle change. If I recall correctly, during KSnapshot time it wasn't always bound to start that application and I think I never received this functionality.

I can, of course, bind it, but that won't help for the other long-time users who have the same problem and therefore I don't want alter the current debuggable configuration.
Comment 6 Christophe Marin 2024-04-19 09:32:21 UTC
Do you have more than one monitor?

Does the window appear if you run 'spectacle -a' or 'spectacle -l' ?
Comment 7 Szőts Ákos 2024-04-22 06:57:49 UTC
No, I have only one monitor with multiple inputs. Spectacle starts for both kinds of invocation.
Comment 8 fanzhuyifan 2024-04-22 14:37:32 UTC
> I remember Print Screen disappeared (or never appeared) during the change of KSnapshot -> Spectacle change. If I recall correctly, during KSnapshot time it wasn't always bound to start that application and I think I never received this functionality.

Ahh that was several years ago and if that was indeed the issue we can't do anything about it now..
Comment 9 tneo 2024-05-02 15:23:41 UTC
I have the exact same grievance. After updating to 

Operating System: openSUSE Tumbleweed 20240430
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.8-1-default (64-bit)

The shortcuts for Spectacle are de-activated. I have to go into settings and set all the shortcuts active again (I'm using the default assigned). The remnants of conflicting shortcuts I manually removed from the config file. It is not clear what triggers the reset of the shortcuts for spectacle as it was doing ok for a while.
Comment 10 Ricardo J. Barberis 2024-05-18 21:40:36 UTC
Could this be an openSUSE issue?
I haven't experienced this bug with Fedora 38/39/40 nor before with Slackware 14/15/-current.
Comment 11 Christophe Marin 2024-05-21 10:09:32 UTC
(In reply to Ricardo J. Barberis from comment #10)
> Could this be an openSUSE issue?
> I haven't experienced this bug with Fedora 38/39/40 nor before with
> Slackware 14/15/-current.

probably not, we don't have anything changing global shortcuts
Comment 12 duha.bugs 2024-05-23 16:18:37 UTC
*** Bug 487397 has been marked as a duplicate of this bug. ***
Comment 13 duha.bugs 2024-05-23 16:19:21 UTC
Can you check if this fixes the issue for you? https://discuss.kde.org/t/spectacles-global-shortcuts-reset-after-reboot/15882
Comment 14 tneo 2024-06-11 19:16:20 UTC
This is the most annoying bug I have experienced with KDE Plasma in a while. I have Spectacle using the default shortcuts (which has a conflicting shortcut for recording a window btw) and the shortcuts get reset every time to nothing. I had 2 Spectacles listed, but that was not the issue. I reverted everything to default and that did not resolve anything either. It appears related to upgrade process, but I have not found which update breaks the shortcuts.
Comment 15 waterlubber 2025-02-09 16:45:54 UTC
Try removing ~/.local/share/kglobalaccel - I think that fixed the issue for me.