Bug 472156 - [Feature Request] Forwarding keyboard shortcuts from lockscreen
Summary: [Feature Request] Forwarding keyboard shortcuts from lockscreen
Status: RESOLVED INTENTIONAL
Alias: None
Product: kscreenlocker
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 5.27.6
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-11 13:15 UTC by emailjcd
Modified: 2023-09-12 20:41 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emailjcd 2023-07-11 13:15:48 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

I have a CLI command that I can use to turn toggle the power to my monitor for my media PC. I'd like to be able to use this from my keyboard, even when the PC is locked. I'm okay installing a daemon like `xbindkeys`, but am not sure how to forward specific keyboard shortcuts when the computer is locked. The way this currently works is that I pull up a webpage on my phone that's hosted by the machine, and it talks to a remote, eg:

curl http://neon/api/power/toggle

Is there any way to have a lockscreen-compatible keyboard shortcut that does this?


STEPS TO REPRODUCE
1. N/A

OBSERVED RESULT
N/A

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: linux 6.3.8
(available in About System)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-09-12 20:41:52 UTC
In the interests of security, I'm afraid there is no way to do this. However we do hardcode certain exceptions for registered global shortcuts, which allow interacting with the system in a secure way. One example is the "Turn off screen" action, which you can bind a global shortcut to, and then this action can be used to turn off the screen from the lock screen.