[Share Experiences] 为fcitx5制作添加自定义码表
Tofloor
poster avatar
deepin
2022-04-02 03:50
Author

本人使用新世纪五笔,但是更新系统后新世纪输入法经常消失不见,根据这位老哥的贴子把fcitx升级到了fcitx5:https://bbs.deepin.org/zh/post/233230?offset=1&postId=1314838

但是fcitx和fcitx5的码表文件并不通用,码表需要重新制作,下面是制作方法:

1、准备码表文件,格式如下:

KeyCode=abcdefghijklmnopqrstuvwxy
Length=4
Pinyin=@
[Rule]
e2=p11+p12+p21+p22
e3=p11+p21+p31+p32
a4=p11+p21+p31+n11
[Data]
a 工
aa 式
aaa 工
aaaa 工
aaaa 恭恭敬敬
aaad 工期

[Data]之前的配置必须要加上,不然转换码表的时候会报错。也可以在/usr/share/libime/中找到.main.dict文件,使用libime_tabledict -d命令把码表转换到文本文件查看格式,如:libime_tabledict -d wbx.main.dict 1.txt

2、从码表文本转换到码表dict:

libime_tabledict 1.txt nwb.main.dict

3、从/usr/share/fcitx5/inputmethod/目录下找个.conf文件做模板,修改Name[*]和File,conf文件还放在此目录

4、把转换的码表文件*.main.dict放到/usr/share/libime/,网上有些说把两个文件放到~/.local...下,但我这样配置无法使用。

5、注销一下输入法就能添加了。

附加自用的新世纪五笔码表:新世纪.zip

Reply Favorite View the author
All Replies
beavailable
deepin
2022-04-02 03:57
#1

放在家目录下也是可以的。

这是我的一个码表项目,里面有个安装脚本(支持 fcitxfcitx5),你可以看看:https://github.com/beavailable/better-wubi

Reply View the author
liwl
deepin
2022-04-02 03:58
#2

agree

妙啊!

Reply View the author
deepin-superuser
deepin
2022-04-02 04:01
#3

想知道怎么从 rime 的码表转到 fcitx5 的码表

Reply View the author
deepin
2022-04-02 04:07
#4
deepin-superuser

想知道怎么从 rime 的码表转到 fcitx5 的码表

rime码表是啥样的?先转到txt再转到fcitx5

Reply View the author
deepin
2022-04-02 04:09
#5
beavailable

放在家目录下也是可以的。

这是我的一个码表项目,里面有个安装脚本(支持 fcitxfcitx5),你可以看看:https://github.com/beavailable/better-wubi

可能是我之前用的码表文件有问题

Reply View the author
deepin-superuser
deepin
2022-04-02 04:15
#6

rime码表是啥样的?先转到txt再转到fcitx5

flypy.table.zip

是一个 bin 格式的二进制文件,不知道怎么转成 txt

Reply View the author
deepin
2022-04-02 04:36
#7
It has been deleted!
deepin
2022-04-02 04:48
#8
deepin-superuser

flypy.table.zip

是一个 bin 格式的二进制文件,不知道怎么转成 txt

http://flypy.ysepan.com/小鹤音形for搜狗五笔自定义方案

你看看是不是这个

Reply View the author
deepin-superuser
deepin
2022-04-02 05:27
#9

http://flypy.ysepan.com/小鹤音形for搜狗五笔自定义方案

你看看是不是这个

这个可能不全,我安装的 Windows 版有6W多条记录,这个只有5W多

Reply View the author
deepin-superuser
deepin
2022-04-02 06:10
#10

http://flypy.ysepan.com/小鹤音形for搜狗五笔自定义方案

你看看是不是这个

试了一下,没发现什么大问题,只是原版的候选最多两个,这个是5个

发现问题了,z 这个字母好像有点问题

image.png

image.png

Reply View the author
deepin
2022-04-02 15:00
#11
deepin-superuser

试了一下,没发现什么大问题,只是原版的候选最多两个,这个是5个

发现问题了,z 这个字母好像有点问题

image.png

image.png

候选词个数能调,五笔中z被定义成其它功能

image.png

Reply View the author
deepin-superuser
deepin
2022-04-02 16:57
#12

候选词个数能调,五笔中z被定义成其它功能

image.png

明白了,多谢

Reply View the author
小田tjy0916
deepin
2022-04-02 18:21
#13

使用第三方输入 法,很容易出问题,目前的最新版本

Reply View the author
字甲达宾
deepin
2022-04-05 06:44
#14

根据楼主提供的 新世纪五笔的 dict 码表文件和 conf 文件,打了个 DEB。

文件大小:1.6 M

fcitx5-table-nwb_2022.4.1-1_all.deb

https://url48.ctfile.com/f/30646948-563101475-c425ef
(访问密码:6859)


DEB 包内主要文件清单:

usr/share/doc/fcitx5-table-nwb/README.zh_CN

usr/share/libime/nwb.main.dict

usr/share/fcitx5/inputmethod/nwb.conf


注:conf 文件中,看到关于图标定义的定义(在第4行)

Icon=fcitx-wubi

用 dpkg -S fcitx-wubi 查了一下,

fcitx-data: /usr/share/icons/hicolor/48x48/apps/fcitx-wubi.png

这个图标似乎是所有 fcitx 五笔通用的图标。

在早期 fcitx4 中,输入法图标是在这个目录:

/usr/share/fcitx/imicon/

在此之前,我有做过一个 fcitx4 的 新世纪笔的 图标。如果有朋友能告知

(我不太熟悉 fcitx5 的图标目录定义路径),稍后下一版本 DEB 中,

会增加一个单独的新世纪五笔的图标。

Reply View the author
Comments
2022-04-05 17:03
图标放别的目录也行,创建个链接到这个目录/usr/share/icons/hicolor/48x48/apps/
VI~TONISEN
deepin
2022-11-13 07:12
#15

好了,这个方法可以,现在我在使用五笔091版本。

。。。。。。。。。。。。。。。。。。。。。。

五笔86版和40多岁的人思想打架,可不好。

。。。。。。。。。。。。。。。。。。。

09五笔输入法09年开始十年的完善,已经很成熟了。

。。。。。。。。。。。。。。。。。。。。。。。

Reply View the author
龍丨逍雄琥
deepin
2024-04-14 21:45
#16

大哥啊,能不能有空教教小弟啊,我也是用的新世纪五笔,但是这操作我不会啊😭

Reply View the author