Bug 511564 - Custom script adds extra %
Summary: Custom script adds extra %
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (other bugs)
Version First Reported In: 6.4.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-03 09:25 UTC by Markus Oguni
Modified: 2025-11-03 12:39 UTC (History)
4 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 Markus Oguni 2025-11-03 09:25:56 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

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY


STEPS TO REPRODUCE
1. Add a custom command or script in shortcuts like:
playerctl --player=spotify,%any --ignore-player=Bose_QC45 next

2. An additional % gets added
3. Edit the command again, now it is:
playerctl --player=spotify,%%any --ignore-player=Bose_QC45 next

OBSERVED RESULT
Additional escaped % added

EXPECTED RESULT
Keep the same command as it is

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Operating System: Kubuntu 25.10
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.2
Kernel Version: 6.17.0-6-generic (64-bit)
Graphics Platform: Wayland
Processors: 24 × Intel® Core™ Ultra 9 285K
Memory: 128 GiB of RAM (125.1 GiB usable)
Graphics Processor 1: NVIDIA GeForce RTX 5090
Graphics Processor 2: Intel® Graphics


ADDITIONAL INFORMATION
Reproduced in Plasma 6.5.1
Comment 1 Akseli Lahtinen 2025-11-03 10:18:35 UTC
Can confirm, it seems to be only visual bug in the command UI though, since the actual command looks like working fine. Does the command in your bugreport work for you normally as well?

1. Add custom command `echo %`
2. This shows up as `echo %%`
3. Add shortcut to the command and run it with `journalctl -ef` open
4. It shows up correctly as `echo %`


Operating System: KDE Linux 2025-11-03
KDE Plasma Version: 6.5.80
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.0
Kernel Version: 6.17.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15,5 GiB usable)
Graphics Processor: AMD Radeon RX 6600
Comment 2 Markus Oguni 2025-11-03 10:58:05 UTC
(In reply to Akseli Lahtinen from comment #1)
> Can confirm, it seems to be only visual bug in the command UI though, since
> the actual command looks like working fine. Does the command in your
> bugreport work for you normally as well?
> 
> 1. Add custom command `echo %`
> 2. This shows up as `echo %%`
> 3. Add shortcut to the command and run it with `journalctl -ef` open
> 4. It shows up correctly as `echo %`
> 
> 
> Operating System: KDE Linux 2025-11-03
> KDE Plasma Version: 6.5.80
> KDE Frameworks Version: 6.20.0
> Qt Version: 6.10.0
> Kernel Version: 6.17.6-arch1-1 (64-bit)
> Graphics Platform: Wayland
> Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
> Memory: 16 GiB of RAM (15,5 GiB usable)
> Graphics Processor: AMD Radeon RX 6600

Thank you for the very fast reply.

Yes thats true, it seems to be just an UI bug. But then a %% cannot be added, if somehow needed.

I added "kdialog --error %" for testing and it worked. The change later of the script from
kdialog --error %
to
kdialog --error %hi
did not apply the change, i guess thats why i was confused. After a logout and login in worked. I guess this is a common behaivor?
Comment 3 Akseli Lahtinen 2025-11-03 12:25:44 UTC
> did not apply the change, i guess thats why i was confused. After a logout and login in worked. I guess this is a common behaivor?

I can confirm this as well. Do you mind creating separate bug report for this, seems theres multiple bugs occuring. Thanks!
Comment 4 David Redondo 2025-11-03 12:39:45 UTC
I assume it's related to the desktop file spec.

% are escaped as %%