You are not logged in.

#1 2022-08-19 10:31:05

TT-392
Member
Registered: 2018-10-06
Posts: 14

fcitx dead keys not working correctly under wayland

I recently switched to sway (wayland i3wm), and I followd this guide: https://www.fosskers.ca/en/blog/wayland to get fcitx working with japanese input. As input methods, I selected "Mozc" (japanese) and "Keyboard - English (US) - English (US, intl, with dead keys)" in the gui. At first the dead keys only seemed to work on urxvt (the only thing running through xwayland I think), but when I booted it up today, it just didn't work anywhere. To be clear about what actually happens, I press the ' button, and a ' immediately appears, instead of me having to press ' + enter (expected behavior). I have noticed a similar issue on my laptop (similar setup), though, there it seems to sometimes work?

I am mostly wondering if I configured something wrong, or if I should be filing this as a an fcitx bug?

Offline

#2 2022-08-19 14:18:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,227

Re: fcitx dead keys not working correctly under wayland

Did you switch from i3?
If not, then

maybe take a look at https://wiki.archlinux.org/title/Fcitx# … _Autostart

Offline

#3 2022-08-19 18:53:24

TT-392
Member
Registered: 2018-10-06
Posts: 14

Re: fcitx dead keys not working correctly under wayland

seth wrote:

Did you switch from i3?
If not, then

maybe take a look at https://wiki.archlinux.org/title/Fcitx# … _Autostart

I did switch from i3, but I wasn't using fcitx on i3.
The wiki basically tells you to do the exact same thing as the guide I followed.

For clarity, these are the exact steps I took:

I put the following lines in /etc/environment:

 GTK_IM_MODULE=fcitx
 QT_IM_MODULE=fcitx
 XMODIFIERS=@im=fcitx

(and then I restarted)

I put the following line in .config/sway/config:

exec_always fcitx5 -d --replace

which I know is a bit different from what the wiki does, but both methods start fcitx5 on startup.

Also, fcitx works, everywhere, including japanese input. The only thing that isn't working is the dead keys.

Offline

#4 2022-08-19 19:21:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,227

Re: fcitx dead keys not working correctly under wayland

Check the behavior w/ i3/Xorg and post the output of "setxkbmap -print -query"
Also test the former w/o fcitx wrt the dead keys - If fcitx generally works and the dead keys don't (even w/o fcitx, despite picking a dead-key layout variant) that's likely just a bug in sway.

Offline

#5 2022-08-19 19:56:06

TT-392
Member
Registered: 2018-10-06
Posts: 14

Re: fcitx dead keys not working correctly under wayland

seth wrote:

Check the behavior w/ i3/Xorg and post the output of "setxkbmap -print -query"
Also test the former w/o fcitx wrt the dead keys - If fcitx generally works and the dead keys don't (even w/o fcitx, despite picking a dead-key layout variant) that's likely just a bug in sway.

On i3 with fcitx, the dead keys seem to work correctly. And I get the following results from setxkbmap -print -query:

xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us(intl)+inet(evdev)+capslock(su
	xkb_geometry  { include "pc(pc105)"	};
};
rules:      evdev
model:      pc105
layout:     us
variant:    intl
options:    caps:super

I also tried killing fcitx on both i3 and on sway.
On i3, default dead keys work in most places, though, not in the qutebrowser addres bar (didn't try in any text boxes in the browser)
On sway, dead keys don't seem to work, even without fcitx. Though, it seems that, whenever I restart fcitx, dead keys work for some time in urxvt (xwayland).

Offline

#6 2022-08-19 20:16:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,227

Re: fcitx dead keys not working correctly under wayland

"xkb_symbols   { include "pc+us(intl)+inet(evdev)+capslock(su" looks capped, but the X11 deadkeys simply come from the layout, not fcitx (does qutebrowser provide deadkeys w/ fcitx?)
=> sway keyboard layout handling. Please post your sway config before we assume a bug.

Edit: also try unsetting  GTK_IM_MODULE &  QT_IM_MODULE under sway (when trying w/o fcitx)

Last edited by seth (2022-08-19 20:18:56)

Offline

#7 2022-08-19 20:35:11

TT-392
Member
Registered: 2018-10-06
Posts: 14

Re: fcitx dead keys not working correctly under wayland

seth wrote:

"xkb_symbols   { include "pc+us(intl)+inet(evdev)+capslock(su" looks capped, but the X11 deadkeys simply come from the layout, not fcitx (does qutebrowser provide deadkeys w/ fcitx?)
=> sway keyboard layout handling. Please post your sway config before we assume a bug.

Edit: also try unsetting  GTK_IM_MODULE &  QT_IM_MODULE under sway (when trying w/o fcitx)

I tried commenting out  GTK_IM_MODULE &  QT_IM_MODULE in /etc/environment, and restarting, then killing fcitx, but still no dead keys (on sway). Also, I did indeed make a copy paste mistake there, the full output of setsxkbmap -print -query is:

xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us(intl)+inet(evdev)+capslock(super)"	};
	xkb_geometry  { include "pc(pc105)"	};
};
rules:      evdev
model:      pc105
layout:     us
variant:    intl
options:    caps:super

(The caps:super thing is something I did)

Offline

#8 2022-08-19 20:47:40

TT-392
Member
Registered: 2018-10-06
Posts: 14

Re: fcitx dead keys not working correctly under wayland

seth wrote:

"xkb_symbols   { include "pc+us(intl)+inet(evdev)+capslock(su" looks capped, but the X11 deadkeys simply come from the layout, not fcitx (does qutebrowser provide deadkeys w/ fcitx?)
=> sway keyboard layout handling. Please post your sway config before we assume a bug.

Edit: also try unsetting  GTK_IM_MODULE &  QT_IM_MODULE under sway (when trying w/o fcitx)

As for the config file, I just tried with the default config (plus the one line to start fcitx, and I still have the same issue.

Also, you say that deadkeys simply come from the layout, but fcitx deadkeys sure look different than normal system deadkeys. (On normal i3 without fcitx, nothing is displayed when typing the dead key, while in fcitx, a little window appears with the ' or " symbol there.) But idk if that is relevant.

Offline

#9 2022-08-19 20:49:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,227

Re: fcitx dead keys not working correctly under wayland

The "normal" config will rather not get you the intl layout?
https://wiki.archlinux.org/title/Sway#Keymap

Offline

#10 2022-08-19 21:05:07

TT-392
Member
Registered: 2018-10-06
Posts: 14

Re: fcitx dead keys not working correctly under wayland

seth wrote:

The "normal" config will rather not get you the intl layout?
https://wiki.archlinux.org/title/Sway#Keymap

It seems that this was just me being stupid, because I did indeed not have the input method set in sway. I guess I assumed fcitx would just take control of setting the input method (mainly because I think ibus, which I used on i3 does that).

Either way, that seemed to have fixed the problem. tyvm

Offline

Board footer

Powered by FluxBB