Bug 469349 - Custom Shortcuts gobble "keyboard input" letter
Summary: Custom Shortcuts gobble "keyboard input" letter
Status: RESOLVED UNMAINTAINED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_khotkeys (show other bugs)
Version: 5.27.5
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Jansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-04 10:39 UTC by Jaggz H.
Modified: 2024-03-04 19:41 UTC (History)
2 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 Jaggz H. 2023-05-04 10:39:57 UTC
SUMMARY
I have meta-ctrl-shift-L mapped to output " 2>&1 less".
It works, but eats the L (the L from the hotkey itself) -- outputting " 2>&1 ess"
If I map it to m-c-s-E it outputs " 2>&1 lss"

STEPS TO REPRODUCE
1. Make a new keyboard input shortcut
2. Map it to m-c-s-<some letter>
3. Include that letter in the keyboard input (eg. "Space:2:Shift+>:Shift+&:1:Space:Shift+|:Space:L:E:S:S" for the above example, and, of course <some letter> is L or E)
4. Try the shortcut in a text input area somewhere 

OBSERVED RESULT
 2>&1 | ess
EXPECTED RESULT
 2>&1 | less

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-7-amd64 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
I've not tested except with c-a-win-{letter}
Comment 1 Jaggz H. 2023-05-04 10:47:13 UTC
Repeating the letter is a hack to get it to work.
Notice I repeat L:
Trigger: m-c-w-L
Action: Space:2:Shift+>:Shift+&:1:Space:Shift+|:Space:L:L:E:S:S
Notice the repeated L
Comment 2 Nate Graham 2023-05-15 21:02:03 UTC
Where and how exactly did you create these shortcuts?
Comment 3 Bug Janitor Service 2023-05-30 03:45:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Jaggz H. 2023-06-01 06:51:31 UTC
I created them in the normal Settings -> Shortcuts -> Custom Shortcuts.
I created a New Global Shortcut -> Keyboard Input
Email address is like:
  M:Y:E:M:A:I:L:Shift+2:G:M:A:I:L:.:C:O:M  (that first 'm' never gets sent)
Trigger:
 Meta+Ctrl+Shift+j (j for jaggz)

With the following information, from my testing, it seems it Might have something to do with the modifier keys used in the trigger...

I have another keyboard input shortcut (created like normal, and assigned to a single key on my keyboard; ie. no modifiers);
this shortcut sends out "^A^A"  (I use it so a single key can toggle my tmux panes).  Thus, its entry in the shortcut's action area is:
  Ctrl+A:Ctrl+A
When I use it I get an 'a' (letter) output into Konsole.  Actually what it sends out is the 'a' followed by a ^A.
So it seems the initial "Ctrl" in the shortcut action is being lost somehow.  Notice the first letter of those other macros is being lost.
But, if I use the keystroke again it works fine, even if I type normal things in-between.
It'll keep working after that, until I use one of the Meta+Ctrl+Shift shortcuts. If I use one of them, this single-key assigned to ^A^A puts out  the a^A again.

Another note: I made a new hotkey T:E:S:T, assigned to a single key on the keyboard.  It outputs fine.  And the single key for ^A^A works after it too. So, it does seem like something with the modifier keys in the other macros might be related.

Also, they don't look weird in khotkeysrc:
[Data_4_12Triggers]
Comment=Simple_action
TriggersCount=1

[Data_4_12Triggers0]
Key=Meta+Ctrl+Shift+J
Type=SHORTCUT
Uuid={.....uuid here.....}

...
[Data_4_12Actions0]
DestinationWindow=0
Input=J:A:G:G:Z:.:H:Shift+2:G:M:A:I:L:.:C:O:M
Type=KEYBOARD_INPUT
...
[Data_4_35Actions0]
DestinationWindow=0
Input=T:E:S:T
Type=KEYBOARD_INPUT




So, it seems these modifier sequences somehow mess something up.

Last note: the email outputs (using modifiers) never work.  They *always* skip the first letter no matter what I've tried.
Comment 5 Jaggz H. 2023-06-01 09:50:29 UTC
.
Comment 6 Nate Graham 2024-03-04 19:41:56 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.