Bug 433284 - Shortcut for switching input method (Windows + Space) does not work when using kimpanel-ibus-panel
Summary: Shortcut for switching input method (Windows + Space) does not work when usin...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Kimpanel widget (show other bugs)
Version: 5.21.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Weng Xuetian
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-02-20 02:27 UTC by efanzh
Modified: 2024-01-07 06:45 UTC (History)
7 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 efanzh 2021-02-20 02:27:19 UTC
SUMMARY

If I run ibus-daemon without uising kimpanel-ibus-panel, I can use Windows + Space shortcut to switch between input methods, but If I use kimpanel-ibus-panel, the shortcut does not work anymore, but manually clicking on the panel to change input method still works.

STEPS TO REPRODUCE

1. Add a input method panel widget.
2. Run ibus with `ibus-daemon -drx -p /usr/lib/kimpanel-ibus-panel`.
3. Add more input methods to ibus.
4. Press Windows + Space to switch input methods.

OBSERVED RESULT

Got the space character “ ” being typed.

EXPECTED RESULT

Switch to another input method.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Comment 1 Hollis Wu 2021-02-20 16:25:01 UTC
Can confirm this is happening under KDE wayland environment. Previous versions (5.20, 5.19) are also affected.

This should be a upstream bug. Seems that ibus's keybinding mechanism for input method switch and emoji display is Xorg-exclusive (See [0]). The input method switch key should work under xwayland context. For example, the key should work under vscode.

Binding keyboard switching might be possible with the input-method-unstable-v1 wayland protocol? (Not 100% sure) As the protocol allows ibus to listen to all keyboard events.

The only related issue found on ibus repository is [1]. But it is marked as duplicate of implementing input method v2 protocol.

[0]: https://github.com/ibus/ibus/blob/ef4c5c7ef790ce1f80e94a5463e110ed4bae254e/ui/gtk3/keybindingmanager.vala#L74
[1]: https://github.com/ibus/ibus/issues/2245
Comment 2 efanzh 2021-02-20 16:49:02 UTC
The issue happens to my X11 session, not my wayland session. So maybe the issue has nothing to do with wayland.
Comment 3 Hollis Wu 2021-02-22 02:11:07 UTC
Ouch. Sorry for that.

I don't don't have this issue under Xorg. I got rime and mozc in ibus and the Super+space thing can switch them. So,

1. Which input method (under rime) are you using?
2. Does it work in KDE 5.21?
Comment 4 efanzh 2021-02-22 02:34:31 UTC
I found out that I was actually using plasma desktop 5.21.0. The version I said before was wrong, sorry about that. And I am using ibus-libpinyin, not rime.

I have tried multiple times, execute

    ibus-daemon -drx

then Windows + Space works, but the input method panel is not being used. While executing

    ibus-daemon -drx -p /usr/lib/kimpanel-ibus-panel

The input method panel is working, but the shortcut does not work any more.
Comment 5 Hollis Wu 2021-02-22 07:48:41 UTC
I can't reproduce it on my system with ibus-libpinyin. Sorry can't help with this issue.
Comment 6 efanzh 2021-02-22 08:07:25 UTC
What operating system do you use? May be I am missing some packages.
Comment 7 Hollis Wu 2021-02-22 08:30:59 UTC
I'm on arch too.

Got following ibus-related packages:

ibus
ibus-mozc
ibus-rime

Following for kde:

ark
bluedevil
discover
dolphin
dolphin-plugins
drkonqi
ffmpegthumbs
filelight
frameworkintegration
gwenview
kaccounts-integration
kactivities
kalarm
kate
kcalendarcore
kcalutils
kcontacts
kdeclarative
kde-cli-tools
kdeconnect
kdecoration
kded
kdegraphics-thumbnailers
kde-gtk-config
kdelibs4support
kdenlive
kdeplasma-addons
kdesu
kdewebkit
kdialog
keditbookmarks
kfind
khelpcenter
kholidays
kidentitymanagement
kinit
kio-extras
kldap
kmenuedit
konsole
kscreen
ksystemlog
ktorrent
kwalletmanager
kwayland-integration
kwayland-server
kwrited
libappindicator-gtk3
libblockdev
libkdepim
libkgapi
libkipi
libkleo
libkscreen
okular
oxygen
phonon-qt5
pimcommon
plasma-desktop
plasma-meta
plasma-workspace
polkit-kde-agent
print-manager
sddm-kcm
signon-kwallet-extension
spectacle
syndication
systemsettings
xdg-desktop-portal-kde
Comment 8 efanzh 2021-02-22 10:10:31 UTC
I installed all packages in your list, rebooted system, and created a new user with default settings for testing, but the shortcut still does not work.
Comment 9 Weng Xuetian 2021-03-08 01:45:08 UTC
I can't reproduce your issue under X11. I wonder if there's any other keygrab happens that prevent this from working

Could you try to set another key in ibus-setup to see if it works?
Comment 10 efanzh 2021-03-08 14:10:42 UTC
(In reply to Weng Xuetian from comment #9)
> I can't reproduce your issue under X11. I wonder if there's any other
> keygrab happens that prevent this from working
> 
> Could you try to set another key in ibus-setup to see if it works?

Yes, I did try other shortcuts, nothing works as long as I am using kimpanel-ibus-panel.
Comment 11 Weng Xuetian 2021-03-09 21:04:50 UTC
Can you try killall kimpanel-ibus-panel and run it from command line?

Did you see any error like

"Could not convert keyval=.. to keycode"?

If so, could you provide the output of
setxkbmap -print ?
Comment 12 efanzh 2021-03-10 06:03:36 UTC
(In reply to Weng Xuetian from comment #11)
> Can you try killall kimpanel-ibus-panel and run it from command line?
> 
> Did you see any error like
> 
> "Could not convert keyval=.. to keycode"?
> 
> If so, could you provide the output of
> setxkbmap -print ?

No, I did not see any error.

This is the output from `setxkbmap -print`:

xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us+inet(evdev)"	};
	xkb_geometry  { include "pc(pc104)"	};
};
Comment 13 Nate Graham 2022-09-24 19:46:07 UTC
Is this still happening to you in Plasma 5.25 or later?
Comment 14 efanzh 2022-09-26 03:11:44 UTC
(In reply to Nate Graham from comment #13)
> Is this still happening to you in Plasma 5.25 or later?

Yes, it still happens with version 5.25.5.
Comment 15 Nate Graham 2022-09-26 16:41:37 UTC
Thank you for the follow-up!
Comment 16 David Warner 2023-11-05 01:34:04 UTC
IBus 1.5.29 better integrates with Wayland, and the Super+Space shortcut works now in Wayland apps, though not XWayland apps.

https://bugzilla.redhat.com/show_bug.cgi?id=2076596