Git Product home page Git Product logo

Comments (8)

eagleoflqj avatar eagleoflqj commented on June 19, 2024 1

6e7cabb 解决了词库加载问题。我用来测试的配置如下

[
  {
    "id": "xiaobai_simp",
    "name": "小白T9输入法",
    "emoji": true,
    "target": "xiaobai9978/rime-xiaobai_simp",
    "variants": [],
    "license": "GPL-3.0-only"
  }
]

你的输入法有两个问题,一个是不兼容plum,要么按照#8 (comment) 手动把dicts复制到build/librime_native/bin,要么按bczhc/rime-xiaobai_simp@cd50479 把目录打平;还有就是繁简转换似乎不起作用,所以我给variants赋值为[]以屏蔽了转换功能。
Screenshot from 2023-03-04 20-54-13

好像librime的key simulation没有支持这种表达

感觉是你缺了花括号。现在往URL加上debug=on参数可以显示下面的输入框,来直接给librime发key sequence(按回车发送)。

from my_rime.

xiaobai9978 avatar xiaobai9978 commented on June 19, 2024 1

成功了,非常感谢

from my_rime.

bczhc avatar bczhc commented on June 19, 2024

我也试验了好久但没有成功。包括让前端发送KP_[0-9]这样的代码,但好像librime的key simulation没有支持这种表达,把中间的_直接变成破折号——了。还有试了schema文件里用于屏蔽大键盘的那些key_binder也给去掉了,在桌面端可以用大键盘输入,但在这里大键盘也不管用。

from my_rime.

xiaobai9978 avatar xiaobai9978 commented on June 19, 2024

会是因为词库没加载成功吗?

from my_rime.

eagleoflqj avatar eagleoflqj commented on June 19, 2024

会是因为词库没加载成功吗?

如果你使用了ENABLE_LOGGING=ON,那F12的控制台可以看到glog的输出,比如luna_pinyin会有

I20230302 19:28:10.597999 300364 table.cc:299] loading table file: /build/luna_pinyin.table.bin

没什么异常的话加载就没问题。

小键盘不支持肯定是我的问题(因为我是87键用户
我只检查了KeyboardEvent的key,大小键盘的key是一样的,得通过code区分。
好在树莓派78键键盘可以模拟小键盘,我会拿你的输入法测测。

from my_rime.

bczhc avatar bczhc commented on June 19, 2024

日志里看到了:

E20230303 14:31:25.791999 300972 mapped_file.cc:112] attempt to open non-existent file '/build/xiaobai.table.bin'. [rime.js:formatted:1020](http://localhost:8080/rime.js:formatted)
E20230303 14:31:25.791999 300972 table.cc:305] Error opening table file '/build/xiaobai.table.bin'. [rime.js:formatted:1020](http://localhost:8080/rime.js:formatted)
E20230303 14:31:25.791999 300972 dictionary.cc:326] Error loading table for dictionary 'xiaobai'. [rime.js:formatted:1020](http://localhost:8080/rime.js:formatted)

确实词库加载有问题,但是检查了build/librime_native/bin/build/xiaobai.table.bin,文件是存在的。

from my_rime.

eagleoflqj avatar eagleoflqj commented on June 19, 2024

文件加载是从public/ime,那里肯定没有。因为我做了个错误假设,即每个schemaId对应的文件都以schemaId开头

for (const fileName of fileNames) {
const id = fileName.split('.')[0]
if (id in schemaFiles) {

只有rime官方输入法是遵照这个假设的,我得把install_schemas.mjs大修一下

from my_rime.

eagleoflqj avatar eagleoflqj commented on June 19, 2024

资辞了73f109b
本来想加个测试,奈何playwright doesn't support numpad microsoft/playwright#15187

from my_rime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.