Bug 434251 - Custom shortcut not sending key input included in trigger
Summary: Custom shortcut not sending key input included in trigger
Status: RESOLVED UNMAINTAINED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_khotkeys (show other bugs)
Version: 5.21.2
Platform: Manjaro Linux
: NOR minor
Target Milestone: ---
Assignee: Michael Jansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-10 20:12 UTC by layne.fowler
Modified: 2024-03-04 19:42 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description layne.fowler 2021-03-10 20:12:26 UTC
SUMMARY
The first instance of the trigger hotkey is being skipped in the text output.

STEPS TO REPRODUCE
1. Go to System Settings -> Custom Shortcuts -> Edit -> New -> Global Shortcut -> Send Keyboard Input
2. Set the trigger to be Ctrl+Alt+Shift+T
3. Set the action to be "t:e:s:t" without the quotes
4. Apply the changes
5. Test shortcut in a text editor

OBSERVED RESULT
Output in to text editor is "est".

EXPECTED RESULT
Output in to text editor is "test".

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.9.16-1-MANJARO
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Changing the action to "t:t:e:s:t" gives me "test". If I just change the shortcut to Ctrl+Alt+Shift+S then the input text is "tet". It seems like it is dropping the first occurrence of the key used in the trigger.

I previously had a few shortcuts set up that worked fine. It was sometime in the past few weeks that the behavior changed to the current.

Overall the custom shortcuts feel inconsistent. I use a shortcut to output my email address. There are many fields on different websites that miss the first few characters of the output. Releasing the hotkeys fast enough can sometimes cause the output to be incorrect. This is probably beyond the scope of this issue but I thought I'd mention it.
Comment 1 Justin Zobel 2021-03-17 23:11:49 UTC
Confirmed on:
Operating System: Solus 4.2
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Comment 2 Víctor 2021-03-19 23:51:45 UTC
(In reply to layne.fowler from comment #0)
> SUMMARY
> The first instance of the trigger hotkey is being skipped in the text output.
> 
> STEPS TO REPRODUCE
> 1. Go to System Settings -> Custom Shortcuts -> Edit -> New -> Global
> Shortcut -> Send Keyboard Input
> 2. Set the trigger to be Ctrl+Alt+Shift+T
> 3. Set the action to be "t:e:s:t" without the quotes
> 4. Apply the changes
> 5. Test shortcut in a text editor
> 
> OBSERVED RESULT
> Output in to text editor is "est".
> 
> EXPECTED RESULT
> Output in to text editor is "test".
> 
> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: 5.9.16-1-MANJARO
> KDE Plasma Version: 5.21.2
> KDE Frameworks Version: 5.79.0
> Qt Version: 5.15.2
> 
> ADDITIONAL INFORMATION
> Changing the action to "t:t:e:s:t" gives me "test". If I just change the
> shortcut to Ctrl+Alt+Shift+S then the input text is "tet". It seems like it
> is dropping the first occurrence of the key used in the trigger.
> 
> I previously had a few shortcuts set up that worked fine. It was sometime in
> the past few weeks that the behavior changed to the current.
> 
> Overall the custom shortcuts feel inconsistent. I use a shortcut to output
> my email address. There are many fields on different websites that miss the
> first few characters of the output. Releasing the hotkeys fast enough can
> sometimes cause the output to be incorrect. This is probably beyond the
> scope of this issue but I thought I'd mention it.

I confirm. I used Meta key to this kind of shortcuts (trigger words) like my recurrent username. When I try to use it blocks the window until press again the Meta key. 

STEPS TO REPRODUCE
1. Go to System Settings -> Custom Shortcuts -> Edit -> New -> Global Shortcut -> Send Keyboard Input
2. Set the trigger to be Meta+V
3. Set the action to be "v:m:o:r:e:n:o" without the quotes
4. Apply the changes
5. Test shortcut in a text editor

OBSERVED RESULT
Output in to text editor or other text field is "morenomarin" and blocks the window until press again only Meta key.

EXPECTED RESULT
Output in to text editor or other text field is "vmorenomarin".

SOFTWARE/OS VERSIONS
Operating System: KDE neon Testing Edition
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.4.0-67-generic
OS Type: 64-bit
Graphics Platform: X11

ADDITIONAL INFORMATION
This behavior appears since Plasma 5.20.9 (beta).
Comment 3 Nate Graham 2024-03-04 19:42:09 UTC
As announced in https://pointieststick.com/2023/07/26/what-we-plan-to-remove-in-plasma-6/ and https://community.kde.org/Plasma/Plasma_6#Removals, I'm afraid KHotKeys has reached end-of-life in Plasma 6. Accordingly, all bug reports and feature requests for it must be closed now.

Most of what KHotKeys could do can already be done with the newer KGlobalAccel system in Plasma 6. A few features such as mouse gestures and triggering conditions based on changes to window states are not yet implemented in the new system. These will be added in the future if and when resources materialize for them, and/or when a kind soul submits patches to implement them! :) Meanwhile, the 3rd-party "Mouse Actions" app (https://github.com/jersou/mouse-actions) may be usable for implementing your own mouse gestures again.

Thanks for your understanding, everyone.