On X, KHotKeys can be used to add custom shortcuts, linking a key combination to a command being one of the possible shortcut types. On Wayland, KHotKeys is no longer available, since many of its features do not work on Wayland and it being phased out anyway. However, using key combinations to trigger a command is very useful (and actually did work with KHotKeys on Wayland). It would be very useful if this functionality could be added to kcm_keys. (Currently there is a "Custom Shortcuts Service" entry in the kcm_keys menu which displays shortcuts added via KHotKeys before it was made invisible, which lets you change the key combination, but there is no way to create a new shortcut from scratch or to configure the command.) Currently the only workaround is to make a dedicated script for every command and add it as an "application", but this is very impractical and requires editing the script file to edit the command, which is not a good solution.
We can use this bug report to track improving the UX so that creating a script file on disk for every custom command is no longer required.
It turns out this is already possible, but it's quite hidden and unintuitive: you click the "Add Application..." button and then type the command(s) into the text box at the top of the app chooser window. Definitely not obvious! But possible. So that makes this a duplicate of the bug report tracking the UX issue. *** This bug has been marked as a duplicate of bug 460036 ***