<div dir="ltr"><div><div><div>Hi,<br></div>I've added initial support for wayland input method in fcitx<br><br><a href="https://github.com/fcitx/fcitx/tree/wayland">https://github.com/fcitx/fcitx/tree/wayland</a> (still WIP, now it's only handling keyboard event without UI under wayland).<br>
<br></div>While bascially it's quite straight forward to implement that, it's quite painful about some functionality cannot be implemented under wayland.<br><br>The most important one is input context is destructed everytime when it's lost focus. Which makes it's impossible to let input method server to have some localized information binding with a specific context.<br>
<br></div><div>For example, fcitx supports type pair of Full width Punctuation in Chinese, like “ ” (U+201C and U+201D), with same key on the keyboard (This is a common behavior of all hardware keyboard based Chinese input method on all platform). And fcitx track the last typed quote by input context, obviously this is a custom data which cannot be storaged in current protocol.<br>
<br></div><div>And people should just type left quote, switch to any other program if they want to look up some message, and switch back, and type another half of quote (and it should be right quote), this functionality is not possible and all other similar functionality is not possible.<br>
<br></div><div>So any advice about this feature in the future? The model will be changed (input context will not destroyed by application switching?), or add an unique id to track input context state on server side (I guess this would have less impact on current code), or let input method be able to set custom binary data to display server?<br>
<br></div><div>Other fcitx developers and I are interested in contribute such code but I wonder which is a feasible way from others.<br></div><div><br></div><div>Thanks,<br></div><div>Xuetian<br></div></div>