Bug 490140 - On X11, pressing alt+shift+r isn't registered in Konsole or Tastenbrett
Summary: On X11, pressing alt+shift+r isn't registered in Konsole or Tastenbrett
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.27.11
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-12 03:10 UTC by zyf0330
Modified: 2024-09-14 09:18 UTC (History)
2 users (show)

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


Attachments
Situation In terminal (396.88 KB, video/mp4)
2024-07-12 06:36 UTC, zyf0330
Details
Situation In Keyboard layout viewer (191.89 KB, video/mp4)
2024-07-12 06:36 UTC, zyf0330
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zyf0330 2024-07-12 03:10:03 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
***

SUMMARY
Recently, I find that alt+shift+r shortcut doesn't work anymore. In the Keyboard layout viewer, alt+shift+r doesn't active corresponding button. 
In the tty which I switch into by press ctrl+alt+F3, alt+shift+r works which outputs "^[R".

STEPS TO REPRODUCE
1. boot into KDE desktop
2. alt+shift+r doesn't work
3. 

OBSERVED RESULT
Nothing happened when press.

EXPECTED RESULT
Keyboard layout viewer reacts.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 24.04
(available in About System)
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13

ADDITIONAL INFORMATION
I notice that after press alt+shift+r in the System Settings window like Keyboard, UI elements blink like they are refreshed.
Comment 1 zyf0330 2024-07-12 06:36:33 UTC
Created attachment 171596 [details]
Situation In terminal
Comment 2 zyf0330 2024-07-12 06:36:57 UTC
Created attachment 171597 [details]
Situation In Keyboard layout viewer
Comment 3 zyf0330 2024-07-18 08:57:19 UTC
I try it on Wayland, and this problem doesn't appear.
Comment 4 cwo 2024-09-13 11:53:58 UTC
Do you have a global shortcut set for Alt+Shift+R, or an application that listens for this shortcut running? If another application grabs this combination, it will not be sent to the application that has focus.
Comment 5 zyf0330 2024-09-14 01:54:10 UTC
(In reply to cwo from comment #4)
> Do you have a global shortcut set for Alt+Shift+R, or an application that
> listens for this shortcut running? If another application grabs this
> combination, it will not be sent to the application that has focus.

Hi.
I have inspected System Settings Shortcuts and Custom Shortcuts, and there is no alt+shift+r shortcut binding.
I don't think any application listens for this shortcut too, but how to troubleshoot it?
Comment 6 zyf0330 2024-09-14 07:35:02 UTC
Hello, thanks for your prompt, I have find the app grabbing this shortcut.
And after learning Xlib development, I know that how to grab shortcut globally.
But I must use that app, and I want to know how to prevent that app to do that.  I tried XUngrabKey within myself program, it doesn't work.
Can you help me?
Comment 7 cwo 2024-09-14 08:13:50 UTC
(In reply to zyf0330 from comment #6)
> But I must use that app, and I want to know how to prevent that app to do
> that.  I tried XUngrabKey within myself program, it doesn't work.
> Can you help me?

I'm sorry, I don't know much about the internals here.

I would recommend

- seeing whether you can configure the application to not grab that particular shortcut somewhere in the app's settings or cofiguration files
- if you have source code access, remove the key grab for that combination and recompile
- ask in a general support forum for linux/your distribution/X11, where more people may see it compared to a bug on a tracker somewhere
- consider switching to Wayland (if your hardware supports that), where you can turn off the ability for X11 apps to grab input this way
Comment 8 zyf0330 2024-09-14 08:56:30 UTC
Thanks
Comment 9 zyf0330 2024-09-14 09:18:50 UTC
I find a common solution.
I write a program to occupy shortcut globally before that app starts, and exit after it starts.
That app is Feishu.
https://github.com/zyf0330/listen-key-press