#4685

fcitx5 doesn't entirely work through wayvnc

OpenYaLTeRopened 17d ago

With the virtual-keyboard rework (including the Smithay input-method keymap PR), running fcitx5 and wayvnc inside niri, then connecting with vncviewer, fcitx5 doesn't really work. It's a bit strange: Super; usually doesn't work (sometimes it does bring up the fcitx5 menu), but then typing goes straight to the client, and not to fcitx5.

Seems to work on sway with the same setup.

@pgaskin one for your upcoming tests perhaps :)

Activity

4
pgaskin17d ago

Does Ctrl+Alt+Shift+U work? It does for me, and typing goes into the popup.

Are you sure it isn't an issue on the viewer side with the viewer not capturing the keys? Edit: nvm, you said it works on sway.

Another guess: maybe smithay is swallowing it for binds?

YaLTeR17d ago

Neither Ctrl-Alt-Shift-U nor Ctrl-Shift-U work through vncviewer for me, and both of them work when typing directly:

https://github.com/user-attachments/assets/ea097f7e-acfb-42f3-a566-7823de99d71e

You can see here in VNC Super+; worked once to bring up the dialog, but then typing went straight to the client, and subsequent various key combos including Super+; didn't work.

YaLTeR12d ago

I wonder if fixing https://github.com/Smithay/smithay/issues/2227 would improve things here

pgaskin6d ago

Yeah, I was able to reproduce this, and that's definitely it.

Running fcitx and a VNC server with debug logging and the same keymap as the seat, then typing the shortcuts through it sends the shortcut to the terminal, but fcitx only gets the characters without modifiers (only getting a single modifiers event when it grabs, then key events afterwards).

This is caused by niri applying the modifier mask from the VK modifiers with set_modifier_mask, which sends it to the focus, but not the grab, which the gets the keys without the modifiers set.

It works once due to the initial modifiers sent to the grab when the keymap changes.

This can be fixed entirely in smithay.