fcitx / fcitx5-lua

25 stars 7 forks source link

ime.register_trigger not working #24

Closed byte-voyager closed 1 year ago

byte-voyager commented 1 year ago
fcitx5-chinese-addons-bin/now 5.0.16-1 amd64 [已安装,本地]
fcitx5-chinese-addons-data/jammy,jammy,now 5.0.11-1 all [已安装,自动]
fcitx5-chinese-addons/now 5.0.16-1 all [已安装,本地]
fcitx5-config-qt/jammy,now 5.0.11-1 amd64 [已安装,自动]
fcitx5-data/now 5.0.21-3 all [已安装,本地]
fcitx5-frontend-gtk3/jammy,now 5.0.12-1 amd64 [已安装,自动]
fcitx5-frontend-gtk4/jammy,now 5.0.12-1 amd64 [已安装,自动]
fcitx5-frontend-qt5/jammy,now 5.0.10-1build1 amd64 [已安装,自动]
fcitx5-module-chttrans/jammy,now 5.0.11-1 amd64 [已安装,自动]
fcitx5-module-cloudpinyin/jammy,now 5.0.11-1 amd64 [已安装,自动]
fcitx5-module-fullwidth/jammy,now 5.0.11-1 amd64 [已安装,自动]
fcitx5-module-lua-common/now 5.0.10-1 all [已安装,本地]
fcitx5-module-lua/now 5.0.10-1 amd64 [已安装,本地]
fcitx5-module-pinyinhelper/jammy,now 5.0.11-1 amd64 [已安装,自动]
fcitx5-module-punctuation/jammy,now 5.0.11-1 amd64 [已安装,自动]
fcitx5-modules/now 5.0.21-3 amd64 [已安装,本地]
fcitx5-pinyin/jammy,now 5.0.11-1 amd64 [已安装,自动]
fcitx5-table/jammy,now 5.0.11-1 amd64 [已安装,自动]
fcitx5/now 5.0.21-3 amd64 [已安装,本地]
kde-config-fcitx5/jammy,now 5.0.11-1 amd64 [已安装]
libfcitx-config4/vanessa,now 1:4.2.9.8+mint1+vanessa amd64 [已安装]
libfcitx-core0/vanessa,now 1:4.2.9.8+mint1+vanessa amd64 [已安装]
libfcitx-gclient1/vanessa,now 1:4.2.9.8+mint1+vanessa amd64 [已安装]
libfcitx-qt5-1/jammy,now 1.2.7-1.2build1 amd64 [已安装]
libfcitx-qt5-data/jammy,jammy,now 1.2.7-1.2build1 all [已安装]
libfcitx-utils0/vanessa,now 1:4.2.9.8+mint1+vanessa amd64 [已安装]
libfcitx5-qt-data/jammy,jammy,now 5.0.10-1build1 all [已安装,自动]
libfcitx5-qt1/jammy,now 5.0.10-1build1 amd64 [已安装,自动]
libfcitx5config6/now 5.0.21-3 amd64 [已安装,本地]
libfcitx5core7/now 5.0.21-3 amd64 [已安装,本地]
libfcitx5gclient2/jammy,now 5.0.12-1 amd64 [已安装,自动]
libfcitx5utils2/now 5.0.21-3 amd64 [已安装,本地]

lua 5.3

The code below is not working but ime.register_command is ok

function timestamp(_input)
  return os.time(os.date("!*t"))
end
ime.register_trigger("timestamp", "UNIX 时间戳", { }, { "时间戳" }
wengxt commented 1 year ago

you can only use that trigger in quickphrase.

byte-voyager commented 1 year ago

you can only use that trigger in quickphrase.

But it works on my Manjaro+Gnome(triggered when a candidate word appears). Is it a version problem?

wengxt commented 1 year ago

candidate trigger and input trigger are separate things

wengxt commented 1 year ago

currently, most all ime thingy are integrated with only quickphrase .

Except candidate trigger can only be used with pinyin.

Feel free to send pr to pinyin if you want pinyin to also support input trigger directly.