Bug 440431 - Support adding shortcuts for .sh script files directly, not just .desktop files
Summary: Support adding shortcuts for .sh script files directly, not just .desktop files
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-30 18:19 UTC by Nate Graham
Modified: 2023-01-04 14:25 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2021-07-30 18:19:50 UTC
Everything KDE from current git master.


STEPS TO REPRODUCE
1. Open kcm_keys
2. Click "Add Application…"
3. Navigate to the path of a .sh script file (not an application) and select it


OBSERVED RESULT
The script file does not appear in the KCM anywhere


EXPECTED RESULT
It does
Comment 1 Nate Graham 2021-08-06 18:02:41 UTC
According to information in Bug 438985, this used to work; raising priority as it is a regression and those are automatically higher priority.
Comment 2 David Edmundson 2021-08-06 22:37:09 UTC
Having a read of the code there is absolutely no way this would have worked before. User is wrong and it is not a regression, but a request for a new unsupported feature.
Comment 3 Justin Zobel 2022-10-03 08:24:12 UTC
I have shortcuts that point to bash files that have been added before this happened. So this is a regression.
Comment 4 Nate Graham 2022-10-03 08:27:22 UTC
As David said, there is no regression in the Shortcuts KCM since it never had this feature.

If you're saying you had custom shortcuts in the KHotkeys KCM (aka "Custom Shortcuts") and can't use them on Wayland, the fact that on Wayland, they aren't either accessible or migrated to the Shortcuts KCM is a problem and a regression, but it's not a regression in the Shortcuts KCM itself. Addressing that needs a new bug report to track it.
Comment 5 Justin Zobel 2022-10-03 23:54:06 UTC
While I agree there is no code regression here, there is definitely a UX regression for Plasma as a whole. I was using X11 before and now that I am using Wayland I cannot add or manage shortcuts for shell scripts because khotkeys has been deprecated/hidden.
Comment 6 Nate Graham 2022-10-04 08:03:43 UTC
That's quite fair, yeah.
Comment 7 Nate Graham 2022-10-06 07:35:46 UTC
(That overarching UX regression is tracked with Bug 460036)
Comment 8 Nate Graham 2023-01-04 14:25:02 UTC
Git commit 35881adf826e17f6c59c185455ba7d21c4149102 by Nate Graham, on behalf of Bharadwaj Raju.
Committed on 04/01/2023 at 14:24.
Pushed by ngraham into branch 'master'.

kcms/keys: Add an "Add Command" button

After reading a good amount of feedback and questions from users, it seems that
it is not clear that the textbox in the "Add Application…" dialog can be used to
add custom commands.

Some examples of user confusion:
- https://old.reddit.com/r/kde/comments/xw8k06/the_new_shortcut_page_in_wayland_is_a_big/
- https://old.reddit.com/r/kde/comments/x0tmr5/custom_keyboard_shortcut_to_run_command/
- https://old.reddit.com/r/kde/comments/xf59gs/how_do_i_create_a_custom_shortcut/
- https://old.reddit.com/r/kde/comments/xf4a3g/global_mappings/
- https://old.reddit.com/r/kde/comments/xe59pe/custom_shortcuts_disappeared_in_system_settings/

This commit adds a separate button to add a command, which opens a dedicated
overlay sheet that can be used to add a custom command, which then lives in a
new "Commands" section in the sidebar.
Related: bug 460036
FIXED-IN: 5.27

M  +17   -2    kcms/keys/basemodel.cpp
M  +16   -1    kcms/keys/basemodel.h
M  +17   -3    kcms/keys/globalaccelmodel.cpp
M  +48   -2    kcms/keys/kcm_keys.cpp
M  +2    -0    kcms/keys/kcm_keys.h
M  +115  -11   kcms/keys/package/contents/ui/main.qml
M  +2    -1    kcms/keys/standardshortcutsmodel.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/35881adf826e17f6c59c185455ba7d21c4149102