该如何熟悉fcitx的按键事件处理的流程呢?(指的是从代码方面)

48 views
Skip to first unread message

Xd D

unread,
Jun 19, 2020, 1:48:02 PM6/19/20
to fcitx-dev
当跟读按键处理的流程代码时,我发现它相当的复杂,从frontend->IM(ProcessKey)->具体的输入法处理, 代码的注释不是很多,这让我在看代码时总是很迷茫,现在都没有什么进展。
想寻求一些帮助:是否有一些文档或者建议 能帮助我理解fcitx按键处理的代码流程?

Weng Xuetian

unread,
Jun 19, 2020, 1:53:22 PM6/19/20
to fcitx-dev
建议看 Fcitx 5 比较好,Fcitx 4 里面有很多历史遗留的功能…没有很好的组织在一起。
有很多琐碎的按键处理基本上都是为了某些快捷键和当初设计不是很好的 API

Fcitx 5 就比较直观
https://github.com/fcitx/fcitx5/blob/master/src/lib/fcitx/inputcontext.cpp#L180
https://github.com/fcitx/fcitx5/blob/master/src/lib/fcitx/instance.cpp#L1105

On Fri, Jun 19, 2020 at 10:48 AM Xd D <ss4...@gmail.com> wrote:
>
> 当跟读按键处理的流程代码时,我发现它相当的复杂,从frontend->IM(ProcessKey)->具体的输入法处理, 代码的注释不是很多,这让我在看代码时总是很迷茫,现在都没有什么进展。
> 想寻求一些帮助:是否有一些文档或者建议 能帮助我理解fcitx按键处理的代码流程?
>
> --
> You received this message because you are subscribed to the Google Groups "fcitx-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fcitx-dev+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fcitx-dev/6cf24a9f-0180-4a3a-95e3-263853d46eb0o%40googlegroups.com.

Xd D

unread,
Jun 21, 2020, 9:15:38 PM6/21/20
to fcitx-dev

非常感谢回复,我往fcitx5看一下。
在 2020年6月20日星期六 UTC+8上午1:53:22,CS Slayer写道:
建议看 Fcitx 5 比较好,Fcitx 4 里面有很多历史遗留的功能…没有很好的组织在一起。
有很多琐碎的按键处理基本上都是为了某些快捷键和当初设计不是很好的 API

Fcitx 5 就比较直观
https://github.com/fcitx/fcitx5/blob/master/src/lib/fcitx/inputcontext.cpp#L180
https://github.com/fcitx/fcitx5/blob/master/src/lib/fcitx/instance.cpp#L1105

On Fri, Jun 19, 2020 at 10:48 AM Xd D <ss4...@gmail.com> wrote:
>
> 当跟读按键处理的流程代码时,我发现它相当的复杂,从frontend->IM(ProcessKey)->具体的输入法处理, 代码的注释不是很多,这让我在看代码时总是很迷茫,现在都没有什么进展。
> 想寻求一些帮助:是否有一些文档或者建议 能帮助我理解fcitx按键处理的代码流程?
>
> --
> You received this message because you are subscribed to the Google Groups "fcitx-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fcit...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages