flathub / org.fcitx.Fcitx5.Addon.ChineseAddons

https://flathub.org/apps/details/org.fcitx.Fcitx5.Addon.ChineseAddons
1 stars 3 forks source link

NumLock打开时拼音输入法下使用左右shift做二三候选无法使用 #1

Closed pikakolendo02 closed 3 years ago

pikakolendo02 commented 3 years ago

首先赞美囧脸! 个人以前在fcitx4下的习惯,在非编辑状态下按shift激活/非激活输入法,编辑状态下按左右shift选择二三候选。 而在fcitx5 5.0.4中,发现无法设置shift为二三候选。

fcitx5全局配置如下: 图片 拼音输入法配置如下: 图片 按下左右shift后并没有任何事情发生。如果使用shift作为中英文切换,则直接切换成yingwen并将编辑中的拼音字符串上屏。

而在fcitx4中,全局配置里使用SHIFT作为二三候选快捷键并没有问题。 系统信息: 图片

wengxt commented 3 years ago

我测试没啥问题啊,你用的什么版本哪里安装的?

pikakolendo02 commented 3 years ago

从flathub官方源安装的,只用了flatpak install org.fcitx.Fcitx5安装本体,以及中文和日文输入法。 flatpak list Name Application ID Version Branch Installation Fcitx 5 org.fcitx.Fcitx5 5.0.4 stable system 中文附加组件 org.fcitx.Fcitx5.Addon.ChineseAddons 5.0.3 stable system Fcitx 5 的 Mozc 支持 org.fcitx.Fcitx5.Addon.Mozc 2.26.4220.106.1 stable system default org.freedesktop.Platform.GL.default 20.08 system openh264 org.freedesktop.Platform.openh264 2.1.0 2.0 system Adapta Gtk+ theme org.gtk.Gtk3theme.Adapta 3.22 system Mint-Y Gtk Theme org.gtk.Gtk3theme.Mint-Y 3.22 system Mint-Y-Aqua Gtk Theme org.gtk.Gtk3theme.Mint-Y-Aqua 3.22 system KDE Application Platform org.kde.Platform 5.15 system Okular org.kde.okular 20.12.2 stable system

wengxt commented 3 years ago

建议录屏看看(推荐simplescreenrecorder),我测试了一下拼音是没问题的(当然如果你问 Mozc 的话,Mozc 当然是不能用拼音的快捷键的)

pikakolendo02 commented 3 years ago

并不是mozc,是中文拼音 simplescreenrecorder-2021-02-10_17.36.32.mkv.zip 另外,我在另一台机的arch上(kde桌面)从arch源安装的fcitx5用shift选择二三候选就正常。

pikakolendo02 commented 3 years ago

我在实机的mint 20.1上是这样安装的: https://pikakolendo.hatenablog.com/entry/2021/02/08/linux_mint_20.1%EF%BC%88%E5%9F%BA%E4%BA%8EUbuntu_20.04_LTS%EF%BC%89%E5%AE%89%E8%A3%85%E6%AD%A3%E5%BC%8F%E7%89%88fcitx5%EF%BC%88flatpak%EF%BC%89 但我在虚拟机里新装的mint 20.1里用同样方法试了一下,发现无法切换到拼音输入法…… 我也不知道我主机里面的fcitx5是怎么run起来的。

--更新-- 虚拟机的mint里在系统设置-输入法中安装了“简体中文”并且选择fcitx,注销登录后使用正常,并且shift能选择二三候选 应该是我主系统里面某些配置出毛病了

--补充-- 主系统中创建了另一个账户,同样出现该问题;没有问题的虚拟机中新建的账户也没有问题,似乎不是用户配置的原因 我在另一台mint主机上(已安装fcitx4)使用相同方法安装flatpak版fcitx5,也出现该问题。

pikakolendo02 commented 3 years ago

另外我注意到一点,把当前的fcitx5退出后在终端下手动运行,报以下信息: I2021-02-11 02:30:30.353206 instance.cpp:1307] Override Enabled Addons: {} I2021-02-11 02:30:30.353308 instance.cpp:1308] Override Disabled Addons: {} I2021-02-11 02:30:30.355347 addonmanager.cpp:177] Loaded addon wayland I2021-02-11 02:30:30.366008 addonmanager.cpp:177] Loaded addon xcb I2021-02-11 02:30:30.370315 addonmanager.cpp:177] Loaded addon quickphrase I2021-02-11 02:30:30.372054 addonmanager.cpp:177] Loaded addon clipboard I2021-02-11 02:30:30.372704 addonmanager.cpp:177] Loaded addon imselector I2021-02-11 02:30:30.432366 addonmanager.cpp:177] Loaded addon keyboard I2021-02-11 02:30:30.432903 addonmanager.cpp:177] Loaded addon waylandim I2021-02-11 02:30:30.606100 addonmanager.cpp:177] Loaded addon unicode I2021-02-11 02:30:30.839460 addonmanager.cpp:177] Loaded addon pinyinhelper I2021-02-11 02:30:30.847856 addonmanager.cpp:177] Loaded addon dbus I2021-02-11 02:30:30.865911 addonmanager.cpp:177] Loaded addon fcitx4frontend E2021-02-11 02:30:30.867724 addonloader.cpp:57] Failed to create addon: ibusfrontend Failed to create dbus connection I2021-02-11 02:30:30.870485 addonmanager.cpp:177] Loaded addon xim I2021-02-11 02:30:30.874438 addonmanager.cpp:177] Loaded addon dbusfrontend I2021-02-11 02:30:30.890145 inputmethodmanager.cpp:193] Found 699 input method(s) in addon keyboard I2021-02-11 02:30:30.891541 addonmanager.cpp:177] Loaded addon kimpanel I2021-02-11 02:30:30.931628 theme.cpp:587] New Icon theme: ePapirus I2021-02-11 02:30:30.950803 addonmanager.cpp:177] Loaded addon classicui I2021-02-11 02:30:30.951974 notificationitem.cpp:43] Running inside flatpak. I2021-02-11 02:30:30.952712 addonmanager.cpp:177] Loaded addon notificationitem I2021-02-11 02:30:30.972203 addonmanager.cpp:177] Loaded addon notifications I2021-02-11 02:30:30.986297 kimpanel.cpp:121] Kimpanel new owner I2021-02-11 02:30:30.987790 addonmanager.cpp:177] Loaded addon punctuation I2021-02-11 02:30:31.136593 addonmanager.cpp:177] Loaded addon pinyin 楼上说的两台出问题的机子,都在ibusfrontend这里报错;没有问题的虚拟机则一切正常。

wengxt commented 3 years ago

这个命令的输出贴一下? dbus-send --session --type=method_call --print-reply --dest=org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.DebugInfo

然后就是这个文件的内容是? ~/.config/fcitx5/conf/pinyin.conf

wengxt commented 3 years ago

org.fcitx.Fcitx5 -r --verbose=key_trace=5

这样启动 fcitx 之后,按下 shift 的时候对应的输出是?

pikakolendo02 commented 3 years ago

这个命令的输出贴一下? dbus-send --session --type=method_call --print-reply --dest=org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.DebugInfo

method return time=1613116222.731118 sender=:1.76 -> destination=:1.120 serial=956 reply_serial=2
string "Group [x11::99.0] has 16 InputContext(s)
IC [a13f015e412b4069894a9079a48badde] program:gnome-terminal- frontend:fcitx4 cap:0 focus:1
IC [6486aa296d254ea1a2cbe6e10ee96681] program:firefox frontend:fcitx4 cap:0 focus:0
IC [014e4d30c4af4448a4363b4525366f75] program:firefox frontend:fcitx4 cap:0 focus:0
IC [d4d66f0340b54704980b98a0c0ca3ee1] program: frontend:dbus cap:0 focus:0
IC [4b961db4c81d444aaa5bab070e322077] program:kdeconnectd frontend:fcitx4 cap:0 focus:0
IC [cbd7612aaed24f5cb2cb1e3bf65d9834] program:kdeconnectd frontend:fcitx4 cap:0 focus:0
IC [7e9bc4d1bc4a4e3e97e1c7c5c4aaac14] program: frontend:dbus cap:0 focus:0
IC [652eb5438c9d417f8b3fae6f8fe10bd2] program:nemo-desktop frontend:fcitx4 cap:0 focus:0
IC [10f294c01172452a9ccbf4e9ea003182] program:nemo-desktop frontend:fcitx4 cap:0 focus:0
IC [1429710e4b1c49e795795a1a52b6b767] program:firefox frontend:fcitx4 cap:0 focus:0
IC [22987b98df724f56aa9463e535e2bf78] program:cinnamon frontend:fcitx4 cap:40 focus:0
IC [e8899475b1a2450c90a2abaf2d491034] program:cinnamon frontend:fcitx4 cap:40 focus:0
IC [0fe7bf6c5a724263a92b1d605de3deb9] program:gnome-terminal- frontend:fcitx4 cap:0 focus:0
IC [81d20edd90af4ff89d5d6ad70afd47b7] program: frontend:xim cap:4000000000 focus:0
IC [dfcedd7c60064b1f9b5590b8a2c41ff6] program:mintUpdate frontend:fcitx4 cap:0 focus:0
IC [bf978aff8ccf49318e4476a6b613fe4d] program:firefox frontend:fcitx4 cap:40 focus:0
Input Context without group
"

然后就是这个文件的内容是? ~/.config/fcitx5/conf/pinyin.conf


# 双拼方案
ShuangpinProfile=Ziranma
# 页大小
PageSize=7
# 启用拼写检查
SpellEnabled=True
# 启用颜文字
EmojiEnabled=True
# 启用拆字
ChaiziEnabled=True
# 启用云拼音
CloudPinyinEnabled=False
# 云拼音位置
CloudPinyinIndex=2
# 在程序中显示预编辑文本
PreeditInApplication=False
# 在预编辑中显示完整拼音
PinyinInPreedit=False
# 启用预测
Prediction=False
# 预测个数
PredictionSize=10
# 快速输入的触发键
QuickPhraseKey=semicolon
# 使用 V 来触发快速输入
VAsQuickphrase=True
# 句子数量
Number of sentence=2
# 输入长于...时提示长词 (设置为 0 时禁用)
LongWordLengthLimit=4
# FirstRun
FirstRun=False

[ForgetWord] 0=Control+7

[PrevPage] 0=minus 1=Up

[NextPage] 0=equal 1=Down

[PrevCandidate] 0=Shift+Tab

[NextCandidate] 0=Tab

[SecondCandidate] 0=Shift+Shift_L

[ThirdCandidate] 0=Shift+Shift_R

[ChooseCharFromPhrase] 0=bracketleft 1=bracketright

[FilterByStroke] 0=grave

[Fuzzy]

ue -> ve

VE_UE=True

gn -> ng

NG_GN=True

内模糊音节 (xian -> xi'an)

Inner=True

短拼音的内模糊音节 (qie -> qi'e)

InnerShort=True

匹配不完整的元音 (e -> en, eng, ei)

PartialFinal=True

u <-> v

V_U=False

an <-> ang

AN_ANG=False

en <-> eng

EN_ENG=False

ian <-> iang

IAN_IANG=False

in <-> ing

IN_ING=False

u <-> ou

U_OU=False

uan <-> uang

UAN_UANG=False

c <-> ch

C_CH=False

f <-> h

F_H=False

l <-> n

L_N=False

s <-> sh

S_SH=False

z <-> zh

Z_ZH=False

[QuickPhrase trigger] 0=www. 1=ftp. 2=http: 3=mail. 4=bbs. 5=forum. 6=https: 7=ftp: 8=telnet: 9=mailto:

pikakolendo02 commented 3 years ago

org.fcitx.Fcitx5 -r --verbose=key_trace=5

这样启动 fcitx 之后,按下 shift 的时候对应的输出是?

D2021-02-12 15:54:23.414429 instance.cpp:915] KeyEvent: Key(Shift_L states=0) rawKey: Key(Shift_L states=16) origKey: Key(Shift_L states=0) Release:0
D2021-02-12 15:54:23.414584 inputcontext.cpp:232] KeyEvent handling time: 0ms
D2021-02-12 15:54:23.525433 instance.cpp:915] KeyEvent: Key(Shift+Shift_L states=1) rawKey: Key(Shift+Shift_L states=17) origKey: Key(Shift+Shift_L states=1) Release:1
D2021-02-12 15:54:23.525753 inputcontext.cpp:232] KeyEvent handling time: 0ms
pikakolendo02 commented 3 years ago

我破案了,我今天偶然发现是NumLock打开时就会触发这个问题,关上NumLock才能正常使用shift选择二三候选 上面说的“没问题”的虚拟机,是因为默认关着NumLock……